Thanks again for the help, and, to follow up, this now does what I
need..
-- partitions a list according to an equivalence relation
partition1 :: (a -> a -> Bool) -> [a] -> ([a],[a])
partition1 eq ls = partition ((head ls) `eq`) ls
--
partitionBy :: (a -> a -> Bool) -> [a] -> [[a]]
partitionBy eq [] = []
partitionBy eq ls =
(fst x):(partitionBy eq (snd x)) where
x = partition1 eq ls
Regards,
Hans van Thiel
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe