Created
November 14, 2017 21:03
-
-
Save titanium-cranium/92a966f6ea8c31ba140a2b5eda0ae4f5 to your computer and use it in GitHub Desktop.
Revisions
-
titanium-cranium created this gist
Nov 14, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ def fib(n) return n if (0..1).include? n fib(n-1) + fib(n-2) if n > 1 end puts fib(7)