[Haskell-cafe] Why is there no "splitSeperator" function in Data.List
Iustin Pop
iusty at k1024.org
Sun Feb 13 11:50:13 CET 2011
On Sun, Feb 13, 2011 at 11:21:42AM +0100, Henning Thielemann wrote:
>
> On Sun, 13 Feb 2011, Iustin Pop wrote:
>
> >On Sat, Feb 12, 2011 at 11:21:37AM -0500, Gwern Branwen wrote:
> >>
> >>See http://hackage.haskell.org/package/split
> >>
> >>The reason it's not in Data.List is because there are a bazillion
> >>different splits one might want (when I was pondering the issue before
> >>Brent released it, I had collected something like 8 different proposed
> >>splits), so no agreement could ever be reached.
> >
> >It is curious though that the Python community managed to agree on a
> >single implementation and include that in the standard library… So it is
> >possible :)
>
> It was not the implementation, that was discussed in length, but it
> was the question, what 'split' shall actually do.
Doh, of course I meant they managed to agree on a single definition of
what split means. Sorry for bad wording.
> If you are satisfied with a simple Haskell 98 implementation of a
> 'split' operation you might like 'chop' in
> http://hackage.haskell.org/packages/archive/utility-ht/0.0.5.1/doc/html/Data-List-HT.html
Probably, but when I can have my own version in ~4 lines of Haskell, I'd
rather not have another dependency (that might or might not be packaged
in my distro).
regards,
iustin
More information about the Haskell-Cafe
mailing list