data Maybe a = Nothing | Just a instance Monad Maybe where ...Beispiel-Anwendung:
case ( evaluate e l ) of Nothing -> Nothing Just a -> case ( evaluate e r ) of Nothing -> Nothing Just b -> Just ( a + b )mittels der Monad-Instanz von Maybe:
evaluate e l >>= \ a -> evaluate e r >>= \ b -> return ( a + b)Ü: dasselbe mit do-Notation