types: applicative instance for monad.