is there a way to get previous item while mapping ...
# stdlib
d
is there a way to get previous item while mapping through the sequence?
m
You could use
zipWithNext
to get a sequence of pairs containing adjacent elements.
🤔 1
d
sounds interesting, will have a look at it, thank you