Proposal: Add functions to get consecutive elements to Data.List
Henning Thielemann
lemming at henning-thielemann.de
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:
http://hackage.haskell.org/package/utility-ht-0.0.11/docs/Data-List-HT.html#v:mapAdjacent
You could simply import that one.
More information about the Libraries
mailing list