|
definition: |
liftM2 :: Monad m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r liftM2 f m1 m2 = do x1 <- m1 x2 <- m2 return (f x1 x2) |
|
demand: |
argument 1 |
|
deterministic: |
deterministic operation |
|
documentation: |
| Promotes a binary function to a monad. The function arguments are scanned from left to right. For instance, `liftM2 (+) [1,2] [3,4]` evaluates to `[4,5,5,6]`, and `liftM2 (,) [1,2] [3,4]` evaluates to `[(1,3),(1,4),(2,3),(2,4)]`. |
|
failfree: |
(_, _, _, _) |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{(_,_,_,_) |-> _}
|
|
name: |
liftM2 |
|
precedence: |
no precedence defined |
|
result-values: |
_ |
|
signature: |
Monad d => (a -> b -> c) -> d a -> d b -> d c |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
yes |
|
totally-defined: |
reducible on all ground data terms |