We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fae9e76 + 26c19dd commit b759878Copy full SHA for b759878
src/Control/Apply.purs
@@ -59,6 +59,12 @@ infixl 4 applySecond as *>
59
60
-- | Lift a function of two arguments to a function which accepts and returns
61
-- | values wrapped with the type constructor `f`.
62
+-- |
63
+-- | ```purescript
64
+-- | lift2 add (Just 1) (Just 2) == Just 3
65
+-- | lift2 add Nothing (Just 2) == Nothing
66
+-- |```
67
68
lift2 :: forall a b c f. Apply f => (a -> b -> c) -> f a -> f b -> f c
69
lift2 f a b = f <$> a <*> b
70
0 commit comments