Hello,
Closures were implemented in Squeak/Pharo according to the blue book, so
they were not real closures, up to 2008. Then the VM and the compiler were
changed to support real closures.
The code you showed should work both on latest Squeak and on latest Pharo
fine. Old version of Squeak and/or
I read that Blocks in Squeak and Pharo, since it was derived from Squeak
did not implement true block closures and would not support block
recursion. On one count the statement was correct, but not on the other.
I tried:
| a f |
a := 0.
f := [ Transcript show: a. (a < 5)ifTrue:[a :