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

Frank Shearar frank.shearar at gmail.com
Mon Apr 11 20:27:57 UTC 2016


On 11 April 2016 at 10:59, Tobias Pape <Das.Linux at gmx.de> wrote:

>
> 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?
>

Yes. I wrote up an intro a few years back, after Michael presented Xtreams
at UKSTUG:
http://www.lshift.net/blog/2010/11/29/xtreams-framework-for-squeak/

frank



> Best
>         -Tobias
> >
> > It is tested. :-)
> >
> > Thanks Patrick for the idea.
> >
> > Best,
> > Marcel
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160411/30a5ddf7/attachment.htm


More information about the Squeak-dev mailing list