Monad related functions.