The dual of traversable functor, allows zipping a nested structure efficiently.

All instances of the distributive functor g must satisfy the following laws:

  • Identity: For all functor f and data x; distribute(f)(x) equals to distribute(f)(map(id)(x)),
  • Reversibility: For all distributive functor f and data x; g.distribute(f)(f.distribute(g)(x)) equals to x.

Type Parameters

  • G

Hierarchy

Properties

Properties

distribute: (<F>(functor) => (<A>(fga) => Get1<G, Get1<F, A>>))

Type declaration

    • <F>(functor): (<A>(fga) => Get1<G, Get1<F, A>>)
    • The dual of sequenceA of traversable functor.

      Type Parameters

      • F

      Parameters

      • functor: Functor<F>

        The Functor instance for F.

      Returns (<A>(fga) => Get1<G, Get1<F, A>>)

      The distributed type onto G<F<_>>.

map: (<T, U>(fn) => ((t) => Instance<Apply1<G, U>>))

Type declaration

Generated using TypeDoc