pipe

Alan Lovejoy squeak-dev.sourcery at forum-mail.net
Mon Aug 27 01:08:09 UTC 2007


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