15 lines
205 B
Plaintext
15 lines
205 B
Plaintext
|
defn if c t e = {
|
||
|
case c of {
|
||
|
True -> { t }
|
||
|
False -> { e }
|
||
|
}
|
||
|
}
|
||
|
|
||
|
defn fibtr a b n = {
|
||
|
if (eq n 0) a (fibtr b (a+b) (n-1))
|
||
|
}
|
||
|
|
||
|
defn fib n = { fibtr 1 1 n }
|
||
|
|
||
|
defn main = { fib 40 }
|