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