I think I kind of understand how applicative functors work in Haskell and I'm using them for basic datatypes (Maybe, Either...). However, I found this question with the following example:
withPool pool = bracket (takeConn pool) (putConn pool)
can be rewritten in applicative style:
withPool = bracket <$> takeConn <*> putConn
I was surprised it compiled and indeed it works as expected, but could somebody tell me which Applicative Functor is used for this and how is it defined?
Update: I think I figured out how it works, but I have no idea where is it defined.