License | BSD-style (see the file LICENSE) |
---|---|
Maintainer | sjoerd@w3future.com |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- cotraverse :: (Distributive t, Functor f) => Square '[Costar f] '[Costar f] '[t] '[t]
- distribute :: (Distributive t, Functor f) => Square '[] '[] '[t, f] '[f, t]
Documentation
cotraverse :: (Distributive t, Functor f) => Square '[Costar f] '[Costar f] '[t] '[t] Source #
+--t--+ | v | f<-@-<f | v | +--t--+
cotraverse = (funId ||| fromRight) === distribute === (toLeft ||| funId)
distribute :: (Distributive t, Functor f) => Square '[] '[] '[t, f] '[f, t] Source #
+---t-f-+ | v v | | /-@-/ | | v v | +-f-t---+
distribute = fromRight ||| cotraverse ||| toLeft