
13 Apr
2016
13 Apr
'16
2:44 a.m.
On Wed, 13 Apr 2016, Andreas Abel wrote:
I am neutral on this proposal. I grepped the Agda source (100kloc) for zip.*tail and get 6 uses that fall into your pattern. However, I am not so sure this warrants a new function, in the end
zipConsecutivesWith f xs
is not shorter than
zipWith f xs (tail xs)
unless xs is a long name.
Sometimes mapAdjacent allows partial application, like here:
./TypeChecking/Free/Tests.hs:54:strictlyAscending l = and $ zipWith (<) l $ tail l
and here
./Utils/List.hs:219:sorted xs = and $ zipWith (<=) xs (tail xs)