diff options
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-fib.nix')
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-fib.nix | 7 |
1 files changed, 7 insertions, 0 deletions
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 |