Created
October 31, 2017 14:02
-
-
Save deque-blog/b77ab340690e394611150d765d0235ea to your computer and use it in GitHub Desktop.
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
runPure $ -- Run the pipeline in the Identity Monad (pure) | |
iterating (+1) 0 -- Generate the integers from 0 to infinity | |
.| takingWhile (< 5) -- Take the ones below 5 | |
.| fold (+) 0 -- And sum them |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment