
25 Feb
2004
25 Feb
'04
7:52 a.m.
what you observe is possibly related to this:
http://www.mail-archive.com/haskell@haskell.org/msg07508.html
Although I'm adressing purely the problem of runtime, you are probably right. At least the implementation of partition is still defined in terms of foldr (from Data.List in ghc 6.2): -- > partition p xs == (filter p xs, filter (not . p) xs) partition :: (a -> Bool) -> [a] -> ([a],[a]) {-# INLINE partition #-} partition p xs = foldr (select p) ([],[]) xs select p x (ts,fs) | p x = (x:ts,fs) | otherwise = (ts, x:fs) Is the above strict version of partition more suitable for other optimizations than my partition/foldr case?? Cheers, Jan