12 lines
255 B
Text
12 lines
255 B
Text
Inventory K=0:=0,1:=1
|
|
fib=Lambda K (x as decimal)-> {
|
|
If Exist(K, x) Then =Eval(K) :Exit
|
|
Def Ret as Decimal
|
|
Ret=If(x>1->Lambda(x-1)+Lambda(x-2), x)
|
|
Append K, x:=Ret
|
|
=Ret
|
|
}
|
|
\\ maximum 139
|
|
For i=1 to 139 {
|
|
Print Fib(i)
|
|
}
|