[squeak-dev] Generators on Streams on Generators on Collections
on ...
Chris Muller
asqueaker at gmail.com
Mon Apr 11 17:55:39 UTC 2016
This is so Smalltalk. Very cool.
We should consider it for trunk.
On Mon, Apr 11, 2016 at 10:57 AM, marcel.taeumel <Marcel.Taeumel at hpi.de> wrote:
> 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
|