rubyx/test/mains/source/recurse-fibo__5.rb
Torsten 95af84e752 fixing test to pass
and extract own kind of same tests to bench
bench tests will need some loop, but not as large as c
2019-07-25 21:25:15 +03:00

17 lines
201 B
Ruby

class Space
def fibo_r( n )
if( n < 2 )
return n
else
a = fibo_r(n - 1)
b = fibo_r(n - 2)
return a + b
end
end
def main(arg)
return fibo_r(5)
end
end