<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<font face="Georgia">just curious - which of those surprises you?</font><br>
<br>
<div class="moz-cite-prefix">On 1/21/19 12:47 PM, Stéphane Rollandin
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:48febe8b-d1dd-89a9-6230-e38dfb9b0dc1@zogotounga.net">Hello
all,
<br>
<br>
Is it expected that
<br>
<br>
| blocks x |
<br>
<br>
blocks := OrderedCollection new.
<br>
<br>
(1 to: 3) do: [:n |
<br>
x := n.
<br>
blocks add: [Transcript showln: x]].
<br>
<br>
blocks do: #value
<br>
<br>
<br>
prints 3 three times, while
<br>
<br>
| blocks |
<br>
<br>
blocks := OrderedCollection new.
<br>
<br>
(1 to: 3) do: [:n |
<br>
| x |
<br>
x := n.
<br>
blocks add: [Transcript showln: x]].
<br>
<br>
blocks do: #value
<br>
<br>
prints 1, 2, 3 ?
<br>
<br>
Stef
<br>
<br>
</blockquote>
<br>
</body>
</html>