Proposal: Add functions to get consecutive elements to Data.List

Evan Laforge qdunkan at gmail.com
Wed Apr 13 06:01:37 UTC 2016


On Tue, Apr 12, 2016 at 10:45 PM, Johan Holmquist <holmisen at gmail.com> wrote:
> I am proposing inclusion into base to make it readily available out of the
> box. I think it would fit rather well together with the other zips in
> Data.List.

But then once you go there, I have a list library with 7 more zip
variants, 7 more group variants, 5 more partition variants, some more
spans and breaks and viewR and duplicate dropping and merges and
splits and etc.  And of course I also think they're all useful and I
use them all the time, so surely worth including in Data.List.

I suspect just about everyone has a personal library of list
utilities, all of which are general purpose and useful to that person.
Where to stop?

Interestingly I don't have mapAdjacent because I've never needed it,
but I have zipNext and zipPrev, which I do use frequently, so there's
also quite a bit of bikeshedding potential on the general vs. specific
scale.

I don't mind keeping a local library of things that adapted for my
personal style.


More information about the Libraries mailing list