Skip to content

Instantly share code, notes, and snippets.

@rethab
rethab / gist:5187689
Created March 18, 2013 14:51
Maybe inside IO Monad / MaybeT example
import Control.Monad (guard)
import Control.Monad.Trans.Maybe (MaybeT(..), runMaybeT)
import Control.Monad.Error
import Data.Char
readBoth :: IO (Maybe String)
readBoth = runMaybeT $ do a <- funA2
funB2 a