Hi again!

Just putting it out there for anyone interested.

What I did was define the following in Object:

|> aBlock
        ^ [ :x | x => self => aBlock ]

and also:

=> msg
        ^ msg value: self


This enabled me to compose like this (I know I probably violate every rule
in the book, whatever ):

f :=  [ :x | x + 100 ].
g := [ :x | x +   20 ].
h := [ :x | x +     3 ].

0 => (f |> g |> h). 123

Also tried using ~:

0 => (f ~ g ~ h). 123

It's just a matter of taste I guess, but for me it warms my heart 



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Reply via email to