[squeak-dev] Generators on Streams on Generators on Collections on
...
marcel.taeumel
Marcel.Taeumel at hpi.de
Mon Apr 11 15:57:50 UTC 2016
Hi, there!
Please try the attached change set: stream-chains.cs
<http://forum.world.st/file/n4889389/stream-chains.cs>
It adds the possibility to attach transformations to streams using
generators.
Example:
foo := (#(1 2 3 4 5 6) readStream
select: [:ea | ea even])
collect: [:ea | 2 * ea].
foo upToNil. "#(4 8 12)"
It is tested. :-)
Thanks Patrick for the idea.
Best,
Marcel
--
View this message in context: http://forum.world.st/Generators-on-Streams-on-Generators-on-Collections-on-tp4889389.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.
More information about the Squeak-dev
mailing list
|