\begin{slide}{Monaden mit Null}

\begin{verbatim}
import Control.Monad ( guard )
do a <- [ 1 .. 4 ] 
   b <- [ 2 .. 3 ]
   guard $ even (a + b)
   return ( a * b )
\end{verbatim}
\hline
\begin{verbatim}
[ 1 .. 4 ] >>= \ a -> 
     [ 2 .. 3 ] >>= \ b ->
        if ( even (a+b) ) 
        then return ( a * b ) else mzero
\end{verbatim}
\hline
\begin{verbatim}
class Monad m => MonadPlus m where 
    mzero :: m a ; ...
instance MonadPlus [] where mzero = []
\end{verbatim}
  
\end{slide}

