Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ########
- #########
- ########
- ########
- #########
- [13] pry(main)> ->(n){ (f = ->(a, b, n) { puts b; n == 1 ? a+b : f.call(b, a+b, n-1) }).call(1,1,n) }.call(6)
- 1
- 2
- 3
- 5
- 8
- 13
- => 21
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement