Describe the bug
The reduce implementation passes the incorrect index value when initialValue is excluded; it should start at 1, instead of 0.
To Reproduce
Iterator.from([1,2,3]).reduce((s, v, i) => i)
// -> 1
Expected behavior
Should return 2.
Screenshots
N/A
Additional context
N/A
Describe the bug
The
reduceimplementation passes the incorrectindexvalue wheninitialValueis excluded; it should start at1, instead of0.To Reproduce
Expected behavior
Should return
2.Screenshots
N/A
Additional context
N/A