I often use local loops in monadic code, e.g.
main = do
...
let loop = do
...
if cond then loop else return ()
loop
It seems that I can encode this idiom slightly more concise with the 'fix'
operator (from Control.Monad.Fix), i.e.
main = do
...
fix (\loop -> do
...
if ...)
But is it really semantically equivalent? Is it as efficient?
Per