Let\'s take a function of type (Monad m) => a -> m a. For example:
(Monad m) => a -> m a
ghci> let f x = Just (x+1)
I\'d like to be able to
I came up with this:
last $ take n $ iterate (>>= f) $ Just 1
But it also overflows the stack on large numbers of n. I don't have the time right now to look into it more :-(
n