johncjensen / Ruby-Fibonacci

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#Ruby Fibonacci

This ruby file will output fibonacci numbers for (n), it is using ruby enumerable .inject and only displaying the first item in the array with [0]

To test this it's outputting the first 100 sequences in the fib with an each loop

(0..100).each do |n| puts fib(n) end

#Credit Big thanks to Mike Busch's Gist

&

Brook Riggio #License MIT License

About


Languages

Language:Ruby 100.0%