let rec fib n = if n < 2 then 1 else fib (n - 2) + fib (n - 1) let _ = let n = 30 in Printf.printf "fib(%d)=%d\n" (n) (fib n);