pipe

David Mitchell david.mitchell at gmail.com
Mon Aug 27 02:10:14 UTC 2007


I like the :> and the double semi (and I also like Bert's asPipe).

On 8/26/07, Alan Lovejoy <squeak-dev.sourcery at forum-mail.net> wrote:
> So far, the three pipe operators I like best are "_|", "::" and ":>".  I
> would prefer to use a leading character for the operator's token that
> can't be the beginning of a valid message.  Either "_" or ":" satisfy
> that constraint quite nicely.
>
> | oneWeekAgo |
> oneWeekAgo := Timepoint today - 7 days.
> db getBlogPosts
>     :: filter: [ :blogPost | blogPost date < oneWeekAgo]
>     :: filter: [ :blogPost | db coolPosts includes: item )]
>     :: collectMails
>     :: do: [ :mail | "Happy to announce ..."]
>
> | oneWeekAgo |
> oneWeekAgo := Timepoint today - 7 days.
> db getBlogPosts
>   :> filter: [ :blogPost | blogPost date < oneWeekAgo]
>   :> filter: [ :blogPost | db coolPosts includes: item )]
>   :> collectMails
>   :> do: [ :mail | "Happy to announce ..."]
>
> | oneWeekAgo |
> oneWeekAgo := Timepoint today - 7 days.
> db getBlogPosts
>     _| filter: [ :blogPost | blogPost date < oneWeekAgo]
>     _| filter: [ :blogPost | db coolPosts includes: item )]
>     _| collectMails
>     _| do: [ :mail | "Happy to announce ..."]
>
>
>



More information about the Squeak-dev mailing list