May 1, 2013
3:45 a.m.
On 1 May 2013 04:17, Michael van der Gulik <mikevdg@gmail.com> wrote:
On Wed, May 1, 2013 at 11:46 AM, Igor Stasenko <siguctua@gmail.com> wrote:
| recursion | ( recursion := [ recursion value ] ) value
At least make it useful.
Useful? :) Let me count, how many times i used Fibonacci sequence in my projects....... 0 + 0 + 0 + 0 + ... + 0 = zero. so.. to me your example is as useful as mine :)
fibonacci := [ :i :j | Transcript show: ((i+j) printString); cr. fibonacci value: j value:(i+j). ]. fibonacci value: 1 value: 1.
Doesn't work on my ancient 3.10 image though, but it does run under VW, and might work on more modern closure-capable VMs.
Gulik.
-- Best regards, Igor Stasenko.