liftM2

liftM2 :: Monad m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r
base Control.Monad
Promote a function to a monad, scanning the monadic arguments from left to right. For example, > liftM2 (+) [0,1] [0,2] = [0,2,1,3] > liftM2 (+) (Just 1) Nothing = Nothing