<div>Hi all, </div>
<div>I&#39;m trying to create a function which filters out all number from a list that are divisible by an integer.</div>
<div>Ex. the list [2,3,4,5,6]&nbsp;div 2...should give me the list like: [3,5], other numbers should be removed divisible by 2.</div>
<div>&nbsp;</div>
<div>filter :: (a -&gt; Bool) -&gt; [a] -&gt; [a]&nbsp;<br>filter p [] = []<br>filter p (x:xs) = if p &#39;mod&#39; x&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;then x : filter p xs&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else filter p xs<br>I tried this, but it doesn&#39;t work!!!!
</div>
<div>&nbsp;</div>
<div>Thank You,</div>
<div>Miranda<br><br>&nbsp;</div>