Interpreter input files for testing
This commit is contained in:
parent
2b9e33b106
commit
b17df7cb40
2 changed files with 16 additions and 0 deletions
9
test-inputs/efficient-fibonacci.flup
Normal file
9
test-inputs/efficient-fibonacci.flup
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
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
|
||||||
|
;
|
||||||
|
1 1 n fib
|
||||||
|
;
|
||||||
|
|
||||||
|
50 fib println
|
7
test-inputs/fibonacci.flup
Normal file
7
test-inputs/fibonacci.flup
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
fib: int a -> int
|
||||||
|
| a 0 == -> 1
|
||||||
|
| a 1 == -> 1
|
||||||
|
| 1 1 == -> a 1 - fib a 2 - fib + duplicate println
|
||||||
|
;
|
||||||
|
|
||||||
|
10 fib
|
Loading…
Reference in a new issue