2006/7/12, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
Jared Updike wrote:
> > "split" is... unconcatIntersperse.
>
> How about "separate"?  ("split" or "splitBy" is better but
it is used
> all over the place in many libs)
>
> And for strings I definitely would use split :: [a] -> [a]
-> [[a]]  a
> lot, just like Python's split function. And "words" works
great for
> breaking on multiple spaces, so I would avoid trying to
fill that
> need...

FWIW my home-grown versions of these things are called
fields and unfields.

Also, my version of the "split but don't drop the delimiter" is
breakAll, since it's like a recursive break.

words/unwords and lines/unlines have one argument, so a 2 argument
fielts/unfields would break that "convention".  Maybe:

fields = csv `separateWith` ","
csv = fields `joinWith` "," -- equivalent to concatIntersperse
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to