Proposal: add liftA4 and liftA5 to match liftM4 and liftM5

Henning Thielemann lemming at henning-thielemann.de
Thu Nov 6 09:59:38 UTC 2014


On Thu, 6 Nov 2014, Eric Mertens wrote:

> For what it's worth, the liftA_ versions are suitable for partial application. Additionally I tend to prefer
> liftA2 to reimplementing it each time with <$> and <*> in the same way that I prefer sum to foldl' (+) 0,
> liftA2 expresses my intent while f <$> x <*> y feels leaky. That's not to say I never use it, but the
> operators certainly don't obviate the need for the liftA_ combinators.


I like to add: liftA* and liftM* immediately put you back to the level of 
plain function application. You can combine this easily with ($), (.) or 
any other infix operator. In contrast to that, if you lift using (<*>), 
($) would still require no extra parentheses, but (.) would.


More information about the Libraries mailing list