Most excellent! Thanks. Michael
--- On Sun, 3/14/10, Stephen Tetley <[email protected]> wrote: From: Stephen Tetley <[email protected]> Subject: Re: [Haskell-cafe] Splitting list with predicate To: "michael rice" <[email protected]> Cc: [email protected] Date: Sunday, March 14, 2010, 3:33 PM Hi Michael Data.List.partition - from the docs... partition :: (a -> Bool) -> [a] -> ([a], [a]) Source The partition function takes a predicate a list and returns the pair of lists of elements which do and do not satisfy the predicate, respectively; i.e., partition p xs == (filter p xs, filter (not . p) xs)
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
