summaryrefslogtreecommitdiff
path: root/applicative/h11.hs
blob: 54eb02dd596fe63e63881d6bada6a4ceb4de6529 (plain)
1
2
3
4
5
6
-- http://stackoverflow.com/questions/23316255/lax-monoidal-functors-with-a-different-monoidal-structure
pure a = fmap (const a) unit
unit = pure ()

ff <*> fa = fmap (\(f,a) -> f a) $ ff ** fa
fa ** fb = pure (,) <*> fa <*> fb