Adding split/split' to Data.List, and redefining words/lines with it; also, adding replace/replaceBy

David Roundy droundy at
Thu Jul 10 11:59:20 EDT 2008

On Thu, Jul 10, 2008 at 10:55:23AM -0400, Gwern Branwen wrote:
> words' :: String -> [String]
> words' = filter (not . and . map isSpace) . split isSpace

Note that (and . map f) == all f, which makes this code a bit simpler
and clearer.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url :

More information about the Libraries mailing list