Sorryfoo: n^[:i| n := n+i. ]
vs
foo: n
|s|
s := n.
^[:i| s := s+i. ]Laurent
On Sun, Nov 28, 2010 at 10:51 AM, Max Leske <maxleske@gmail.com> wrote:In the first example you didn't declare 's':foo:n^ [ :i || s | s:= s+i ]Or did I misunderstand the question?Cheers,MaxOn 28.11.2010, at 10:30, laurent laffont wrote:Hi,I can't writefoo: n^[:i| s := s+i. ]butfoo: n
|s|
s := n.
^[:i| s := s+i. ]
Why ?Cheers,
Laurent Laffont
Pharo Smalltalk Screencasts: http://www.pharocasts.com/
Blog: http://magaloma.blogspot.com/