Source

OCamlRuby / samples / fib.rb

Full commit
1
2
3
4
5
6
7
8
9
def fib (n)
  if n <= 2 then
    1
  else
    fib (n - 1) + fib (n - 2)
  end
end

puts (fib (20))