9 lines
268 B
Text
9 lines
268 B
Text
procedure fib(n)
|
|
local source, i
|
|
if type(n) == "integer" & n >= 0 then
|
|
return n @ makeProc {{
|
|
i := @(source := &source)
|
|
if i = (0|1) then i@source
|
|
((i-1)@makeProc(^¤t) + (i-2)@makeProc(^¤t)) @ source
|
|
}}
|
|
end
|