lift package:rio

Lift a computation from the argument monad to the constructed monad.
Abstract RIO to an arbitrary MonadReader instance, which can handle IO.
Lift a function to actions. This function may be used as a value for fmap in a Functor instance. | Using ApplicativeDo: 'liftA f as' can be understood as the do expression
do a <- as
pure (f a)
with an inferred Functor constraint, weaker than Applicative.
Lift a binary function to actions. Some functors support an implementation of liftA2 that is more efficient than the default one. In particular, if fmap is an expensive operation, it is likely better to use liftA2 than to fmap over the structure and then use <*>. This became a typeclass method in 4.10.0.0. Prior to that, it was a function defined in terms of <*> and fmap. Using ApplicativeDo: 'liftA2 f as bs' can be understood as the do expression
do a <- as
b <- bs
pure (f a b)
Lift a ternary function to actions. Using ApplicativeDo: 'liftA3 f as bs cs' can be understood as the do expression
do a <- as
b <- bs
c <- cs
pure (f a b c)
Promote a function to a 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
Note: uses ReadS