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

David Roundy droundy at darcs.net
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.

David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/libraries/attachments/20080710/860cf44d/attachment.bin


More information about the Libraries mailing list