[squeak-dev] Generators on Streams on Generators on Collections on ...

Tobias Pape Das.Linux at gmx.de
Mon Apr 11 17:59:11 UTC 2016


On 11.04.2016, at 17:57, 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)"

upToNil -> upToEnd? :D

Btw: I really like this api, can we do such things with Xtreams, too? 

Best
	-Tobias
> 
> It is tested. :-)
> 
> Thanks Patrick for the idea.
> 
> Best,
> Marcel





More information about the Squeak-dev mailing list