[Haskell-cafe] Missing join and split

David Roundy daveroundy at gmail.com
Fri Dec 28 09:55:46 EST 2007


On Dec 28, 2007 9:51 AM, Benja Fallenstein <benja.fallenstein at gmail.com> wrote:
> If you use intercalate to join, I would presume that you would want to
> use an inverse of it to split. I'd write it like this:

But alas, words and lines differ on how properly to split, so there's
no hint from the standard library which is preferred.  Of course,
there is no inverse to intercalate, so if you want to use a "logical"
approach, perhaps you'd want to define split first, and then define
your join as the inverse of split.  Darcs uses this latter approach,
which gives us a version of "lines" that isn't quite the same as the
one in the prelude.

David


More information about the Haskell-Cafe mailing list