proof that compose is a monad