<div dir="ltr">Hi,<div><br></div><div>If i do this:</div><div><font face="monospace, monospace">f :: (Monad m) => a -> m a</font></div><div><font face="monospace, monospace">f a = ma >>= f</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="arial, helvetica, sans-serif"> or maybe this:</font></div><div><div><font face="monospace, monospace">f :: (Monad m) => Foo -> m a</font></div><div><font face="monospace, monospace">f foo = mb >>= \foo' -> mc >> f foo'</font></div></div><div><font face="monospace, monospace"><br></font></div><div><br></div><div>can i be sure it's tail recursive (as in, with optimization)? is it in fact ever the case? does it depend on the monad? esp obviously i'm very interested in the IO monad in those cases. esp, even if it's tail recursive on the level of haskell, does it entail an execution of the underlying IO action in any way tail-recursively optimized? or does it not even matter because at the level of the execution of the IO value, there's no recursion to speak of anymore? just wondering.</div><div><br></div><div>thanks in advance!</div><div><br></div><div><br></div></div>