Last active
October 31, 2017 13:50
-
-
Save deque-blog/79ed5e26806cbec6c69c2d44944bda34 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
iterating : (Monad m) => (a -> a) -> a -> Source m a | |
iterating f = recur where | |
recur a = do | |
yield a -- Yield the value downstream | |
recur (f a) -- Recurse with (f a) as next seed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment