error: 'Attempt to evaluate a block that is already being
evaluated.'
Michal
michal-list at auf.net
Sun Aug 21 21:05:23 UTC 2005
> Is there a way how to make the above code to work?
Clone your block before evaluating it. The following works for me:
factorial := [:n | n <= 1
ifTrue: [1]
ifFalse: [n * (factorial clone value: n - 1)]
].
factorial clone value: 1
More information about the Squeak-dev
mailing list
|