Last active
August 29, 2015 14:15
-
-
Save skatenerd/08d70c45499e1610206a to your computer and use it in GitHub Desktop.
watbonacci
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 characters
statefulSequence state transformstate plop = plop state : statefulSequence (transformstate state) transformstate plop | |
fib = statefulSequence [1, 1] (\[first, second] -> [second, first + second]) (!! 0) | |
main = print $ take 9 fib | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment