11 lines
251 B
Text
11 lines
251 B
Text
Function fib(x) {
|
|
If x<0 then Error "argument outside of range"
|
|
If x<2 then =x : exit
|
|
Def fib1(x)=If(x>1->lambda(x-1)+lambda(x-2), x)
|
|
=fib1(x)
|
|
}
|
|
Module CheckIt (&k()) {
|
|
Print k(12)
|
|
}
|
|
CheckIt &Fib()
|
|
Print fib(-2) ' error
|