diff options
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests')
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-fib.exp | 1 | ||||
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-fib.nix | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-fib.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-fib.exp new file mode 100644 index 000000000000..8643cf6debac --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-fib.exp @@ -0,0 +1 @@ +89 diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-fib.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-fib.nix new file mode 100644 index 000000000000..9a22d85ac5f1 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-fib.nix @@ -0,0 +1,7 @@ +let + fib' = i: n: m: if i == 0 + then n + else fib' (i - 1) m (n + m); + + fib = n: fib' n 1 1; +in fib 10 |