Completed
Details
Assignee
UnassignedUnassignedReporter
Michael BlumeMichael BlumeApproval
OkPatch
Code and TestPriority
MinorAffects versions
Fix versions
Details
Details
Assignee
Unassigned
UnassignedReporter
Michael Blume
Michael BlumeApproval
Ok
Patch
Code and Test
Priority
Affects versions
Fix versions
Created March 25, 2015 at 11:19 PM
Updated March 27, 2015 at 8:12 PM
Resolved March 27, 2015 at 8:12 PM
To implement the no-init arity of reduce, you have to use the first element of the sequence as an init value, and then you have to skip the first element when you iterate through the sequence. The tests in test-reduce, which focus on using reduce to sum up a bunch of numbers in a range, don't actually pin down this behavior, because the range used starts with zero, and an extra zero doesn't affect the sum.
Screened by: Alex Miller - this is a good tweak to get better tests for the hard this easy to mess up reduce behavior.