Chapter 11 of Learn You a Haskell introduces the following definition:
instance Applicative ((->) r) where
pure x = (\\_ -> x)
f <*
“In the instance, substituting
((->)r)forf:r->(a->b)->(r->a)->(r->b)”
Why, that's not right. It's actually (r->(a->b)) -> (r->a) -> (r->b), and that is the same as (r->a->b) -> (r->a) -> r -> b. I.e., we map an infix and a function which returns the infix' right-hand argument, to a function which takes just the infix' LHS and returns its result. For example,
Prelude Control.Applicative> (:) <*> (\x -> [x]) $ 2
[2,2]