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

Henning Thielemann lemming at
Tue Apr 12 21:01:59 UTC 2016

On Tue, 12 Apr 2016, Johan Holmquist wrote:

>     zipConsecutivesWith :: (a -> a -> b) -> [a] -> [b]
>     zipConsecutivesWith f xs = zipWith f xs (tail xs)

I call it mapAdjacent in my utility-ht package:

You could simply import that one.

More information about the Libraries mailing list