Normal reduce
call:
[1,2,3].reduce(0, { cur, val in
return val
})
Attempt at calling reduce
from an EnumeratedSequence<Array<Element>>
:
[1,2,3].enumerated().reduce(0, { cur, (index, element) in
return element
})
// Error: consecutive statements on a line must be separated by ';'" (at initial reduce closure)