Tom Pledger wrote: > > Zhanyong Wan writes: > : > | I can't help wondering why it isn't > | > | deleteBy' :: (a -> Bool) -> [a] -> [a] > | deleteBy' f [] = [] > | deleteBy' f (y:ys) = if f y then ys else > | y : deleteBy' f ys > > deleteBy'' f = filter (not . f) No. deleteBy' f only deletes the *first* element that satisfies the predicate f, while filter (not . f) deletes *all* such elements. -- Zhanyong