Is there a good idiomatic way to iterate through an array in Coffeescript, but access the current and next element inside the loop? For example, in Python, you can:
[f(current, next) for current, next in zip(a, a[1:])]
array = ['a', 'b', 'c', 'd']
for value, index in array
current = value
next = if array[index+1] then array[index+1] else null
alert "#{current} at #{index}#{next}"