liftA2
liftA2 is a function from the applicative programming paradigm that allows a binary function to be applied to two applicative values. In languages such as Haskell the function is defined in the Data.Functor.Apply module as liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c, where f is any type that implements the Applicative type class.
The basic idea is that liftA2 takes a plain function of two arguments and lifts it into
liftA2 is a generalization of liftA, the one-argument version. While liftA operates on unary functions and a
In functional programming communities, liftA2 is considered a fundamental combinator for working with applicatives because it