help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Inlined blocks


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] Inlined blocks
Date: Sun, 24 Jan 2010 14:49:44 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Lightning/1.0pre Thunderbird/3.0


c := OrderedCollection new.
1 to: 10 do: [:each | c add: [each]].
c collect: [:each | each value]
->  OrderedCollection (11 11 11 11 11 11 11 11 11 11 11)

It works fine using (1 to: 10) do: [...]

In the future, I'll have to remember to avoid #to:do: with Iliad action
blocks :D

Yes, please report a bug. I'll mark it as postponed immediately, but at least we know it's there.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]