\begin{slide}{Rekursion (semantisch)}

bisher:
\begin{verbatim}
fix :: ( a -> a ) -> a
fix f = f ( fix f )
\end{verbatim}
jetzt:
\begin{verbatim}
import Control.Monad.Fix
class MonadFix m where
    mfix :: ( a -> m a ) -> m a

instance MonadFix Action where
mfix f = Action $ \ s0 -> 
    let Action a = f v
        ( s1, v ) = a s0
    in  ( s1, v )
\end{verbatim}

\end{slide}

