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