CurryInfo: base-3.4.0 / Prelude.ap

definition: Info
 
ap :: Monad m => m (a -> b) -> m a -> m b
ap m1 m2 = do
  x1 <- m1
  x2 <- m2
  return (x1 x2)
demand: Info
 argument 1
deterministic: Info
 deterministic operation
documentation: Info
 
Promotes function application to a monad.
For instance,

    > pure not `ap` Just True
    Just False

This is useful to promote application of functions with larger arities
to a monad, as 'liftM2' for arity `2`. For instance,

    > pure (\x y z -> x + y * z) `ap` Just 7 `ap` Just 5 `ap` Just 7
    Just 42
failfree: Info
 (_, _, _)
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {(_,_,_) |-> _}
name: Info
 ap
precedence: Info
 no precedence defined
result-values: Info
 _
signature: Info
 Monad a => a (b -> c) -> a b -> a c
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 yes
totally-defined: Info
 reducible on all ground data terms