[CLJ-1497] sequence with transducers realizes n+2 elements Created: 08/Aug/14 Updated: 08/Aug/14 Resolved: 08/Aug/14
|Affects Version/s:||Release 1.7|
|Fix Version/s:||Release 1.7|
The first element is realized at creation time:
Fully realizing the sequence realizes the other n-1 elements, and 2 more:
Compare with version using seq operations:
Transduce also doesn't seem to exhibit this issue:
|Comment by Alex Miller [ 08/Aug/14 10:02 AM ]|
Patch attached that improves the issue - will now only realize n+1 elements.
|Comment by Nicola Mometto [ 08/Aug/14 10:16 AM ]|
Nice, I added a commit on top of yours to delay the realization of the first element of the lazyseq to the first .next call instead of on SeqIteration creation
|Comment by Alex Miller [ 08/Aug/14 11:12 AM ]|
Fixed by Rich directly, not by patch.