
20 Nov
2006
20 Nov
'06
10:51 a.m.
Never use (/= "") or (/= []), use (not . null), which doesn't have the
Eq constraint.
On 20/11/06, Daniel McAllansmith
On Monday 20 November 2006 20:44, chris moline wrote:
Hey all, I'm thoroughly confused by the type error produced by the following:
sep :: (a -> Bool) -> [a] -> [[a]] sep p = takeWhile (/= "") . iterT (breakDrop p)
It'll be the "" in (/= "").
Maybe you want to be using (/= []) ? That will work for any type a in the Eq class.
Daniel _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe