Skip to content

Instantly share code, notes, and snippets.

@scotthelm
Created October 30, 2020 04:02
Show Gist options
  • Save scotthelm/030999d2551cf908c54b30abd6702381 to your computer and use it in GitHub Desktop.
Save scotthelm/030999d2551cf908c54b30abd6702381 to your computer and use it in GitHub Desktop.
$ ruby -e 'f=->(a, b, i, t){puts a; i += 1; f.(b, a + b, i, t) if i < t}; f.(0, 1, 0, gets.to_i)'
10
0
1
1
2
3
5
8
13
21
34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment