Last active
February 28, 2017 11:06
-
-
Save gdejohn/6d92c2613eb202cb730e to your computer and use it in GitHub Desktop.
Lazy, infinite, corecursive Fibonacci sequence
This file contains 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 characters
value fibonacci = loop([0, 1])(([x, y]) => [y, x + y]).map(Tuple.first); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment