úÎ3portableprovisionalEdward Kmett <ekmett@gmail.com>
Safe-Inferred This is the categorical dual of Traversable. However, there appears
I to be little benefit to allow the distribution via an arbitrary comonad
so we restrict ourselves to .
Minimal complete definition: or
HTo be distributable a container will need to have a way to consistently
I zip a potentially infinite number of copies of itself. This effectively
E means that the holes in all values of that type, must have the same
E cardinality, fixed sized vectors, infinite streams, functions, etc.
4 and no extra information to try to merge together.
The dual of
distribute [(+1),(+2)] 1[2,3] = f = . fThe dual of
=
. . = . fThe dual of
f = f . The dual of
f = f .
distributive-0.3.1Data.DistributiveData.Traversable sequenceAsequencetraversemapMDistributive
distributecollectdistributeMcollectM
cotraversecomapMbaseGHC.BaseFunctoridfmapControl.ApplicativeunwrapMonad WrapMonad
Control.MonadliftM$fDistributiveReverse$fDistributiveBackwards$fDistributiveProduct$fDistributiveCompose$fDistributiveIdentityT$fDistributiveReaderT$fDistributive(->)$fDistributiveIdentity