Closed blerner closed 5 months ago
t = table: x, y row: 3, 4 row: 9999999999999, 6 row: 0, 8 row: 0, 10 end t.reduce("x", T.running-sum)
produces 3. But
3
extend t using x: sum: T.running-sum of x end
correctly produces a much larger number.
The bug is https://github.com/brownplt/pyret-lang/blob/horizon/src/js/trove/table.js#L555 -- it both slices off the first element of the array and starts looping at index 1. It should be sufficient to eliminate the .slice(1) call.
.slice(1)
This doesn't seem to be fixed on CPO currently.
I don't think this ever got merged -- I've created #1725 for it.
produces
3
. Butcorrectly produces a much larger number.
The bug is https://github.com/brownplt/pyret-lang/blob/horizon/src/js/trove/table.js#L555 -- it both slices off the first element of the array and starts looping at index 1. It should be sufficient to eliminate the
.slice(1)
call.