Adding split/split' to Data.List, and redefining words/lines
with it; also, adding replace/replaceBy
Gwern Branwen
gwern0 at gmail.com
Thu Jul 10 13:22:24 EDT 2008
On 2008.07.10 08:59:20 -0700, David Roundy <droundy at darcs.net> scribbled 1.0K characters:
> 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
Good point. I'll make that change.
--
gwern
Consulting radint MD4 Security cocaine advise Uzi Chan RRF Firewalls
-------------- 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/4826e91a/attachment.bin
More information about the Libraries
mailing list