r/functionalprogramming • u/Alternative-Papaya57 • Jan 31 '23
Question Applicative functors
I've been thinking about applicative functors a lot lately, from a purely category theoretical point of view, and it seems to me that one could maybe define them as the endofuntors that have a natural transformation eta from the identity functor on said category ("pure" being the component of eta at the particular objects). Does anybody know if this kind of a definition is sufficient or is it missing some kind of a critical point of applicative functors?
13
Upvotes
View all comments
Show parent comment
2
u/_jackdk_ Feb 04 '23
I don't understand the categorical Day convolution, so I will have to post the Haskell one:
As you say,
eta :: Applicative m => Identity a -> m a.mu :: Applicative m => Day m m a -> m acan be written in terms ofliftA2.