about summary refs log blame commit diff
path: root/tvix/eval/src/tests/tvix_tests/eval-okay-fib.nix
blob: 04cb52e033ae2acd4deff61c02a07658f7685833 (plain) (tree)
1
2
3
4
5
6
7
8
9
   

                 



                                

      
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