Created
December 1, 2016 17:39
-
-
Save craftybones/90659727ec2ee68aee6b54c41ccf6d9c to your computer and use it in GitHub Desktop.
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
| (defn fibo [s1 s2] | |
| (lazy-seq (cons s1 (fibo s2 (+ s1 s2))))) | |
| (defn fibo-even (comp (partial filter even?) fibo)) | |
| (def fibonacci (fibo 1 1)) | |
| (def fibonacci-even (fibo-even 1 1)) | |
| (take 10 fibonacci) | |
| (take 10 fibonacci-even) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment