and now imagine that we have
(1 to: 1000) collect: [:each | {each -1 . each . each + 1}].
I was wondering how we could turn it into a stream
(1 to: 1000) asStream collect: [:each | {each -1 . each . each + 1}].
and what would be the asStream method.
for index based I can see that next
next is something like
next
�� �� ^ self at: (current := current + 1)
and collect: could be rewritten to use a generator.
Now does anybody play with this already?
Does xtream provide a way to do something in the same vein?