module Fibonacci;

import Stdlib.Prelude open;

fib : Nat  Nat  Nat  Nat
  | zero x1 _ := x1
  | (suc n) x1 x2 := fib n x2 (x1 + x2);

fibonacci (n : Nat) : Nat := fib n 0 1;

main : IO := readLn (printNatLn  fibonacci  stringToNat);
Last modified on 2023-12-01 21:13 UTC