| ID | 11024688-a061-4470-881d-ef8dd54cd216 |
|---|---|
| DeertopiaVisibility | public |
Applicative functors (Haskell)
Intuition
TODO: elaborate. revisit convo w/ faye where in which i'd tried to explain applicatives
TODO: Find citations. I first learnt of this representation in 2024 in the Functional Programming Discord server. Just now, i've found [cite:@coot2019monoidal] which presents a variation upon the Monoidal i'm familiar with.
-- Laws:
-- Identity: unit ** a ≅ a ** unit ≅ a
-- Associativity: a ** (b ** c) ≅ (a ** b) ** c
-- Distributivity: (f <$> a) ** (g <$> b) = bimap f g <$> (a ** b)
class Functor f => Applicative' f where
unit :: f ()
(**) :: f a -> f b -> f (a, b)
References
[cite:@coot2019monoidal]