
6 Nov
2014
6 Nov
'14
4:59 a.m.
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.