flup/test-inputs/efficient-fibonacci.flup

10 lines
198 B
Text
Raw Normal View History

2024-10-08 22:48:46 +02:00
fib: int n -> int
| 1 -> fib: int a int b int iterations -> int
| iterations 0 == -> a b +
| 1 -> a b + println b a b + iterations 1 - fib
;
0 1 n fib
2024-10-08 22:48:46 +02:00
;
50 fib println