A structure which lifts both type parameters on P.

All instances of bifunctor f mist satisfy the following laws:

  • Identity: f.biMap(id)(id) equals to id,
  • Composition: For all f, g, h and i; f.biMap(compose(f)(g))(compose(h)(i)) equals to compose(f.biMap(f)(h))(f.biMap(g)(i)).

Type Parameters

  • T

Hierarchy

Properties

biMap: (<A, B>(first) => (<C, D>(second) => ((curr) => Instance<Apply2<T, D, B>>)))

Type declaration

bifoldR: (<A, C>(aFolder) => (<B>(bFolder) => ((init) => ((data) => C))))

Type declaration

    • <A, C>(aFolder): (<B>(bFolder) => ((init) => ((data) => C)))
    • Folds the data structure with function aFolder and bFolder by right associativity.

      Type Parameters

      • A

      • C

      Parameters

      • aFolder: ((a) => ((c) => C))

        The function to reduce items for the first type parameter.

          • (a): ((c) => C)
          • Parameters

            • a: A

            Returns ((c) => C)

              • (c): C
              • Parameters

                • c: C

                Returns C

      Returns (<B>(bFolder) => ((init) => ((data) => C)))

      The value folded data.

        • <B>(bFolder): ((init) => ((data) => C))
        • Type Parameters

          • B

          Parameters

          • bFolder: ((b) => ((c) => C))
              • (b): ((c) => C)
              • Parameters

                • b: B

                Returns ((c) => C)

                  • (c): C
                  • Parameters

                    • c: C

                    Returns C

          Returns ((init) => ((data) => C))

            • (init): ((data) => C)
            • Parameters

              • init: C

              Returns ((data) => C)

bitraverse: (<F>(app) => (<A, C>(f) => (<B, D>(g) => ((data) => Get1<F, Get2<T, C, D>>))))

Type declaration

    • <F>(app): (<A, C>(f) => (<B, D>(g) => ((data) => Get1<F, Get2<T, C, D>>)))
    • Type Parameters

      • F

      Parameters

      Returns (<A, C>(f) => (<B, D>(g) => ((data) => Get1<F, Get2<T, C, D>>)))

        • <A, C>(f): (<B, D>(g) => ((data) => Get1<F, Get2<T, C, D>>))
        • Type Parameters

          • A

          • C

          Parameters

          • f: ((a) => Get1<F, C>)
              • (a): Get1<F, C>
              • Parameters

                • a: A

                Returns Get1<F, C>

          Returns (<B, D>(g) => ((data) => Get1<F, Get2<T, C, D>>))

            • <B, D>(g): ((data) => Get1<F, Get2<T, C, D>>)
            • Type Parameters

              • B

              • D

              Parameters

              • g: ((b) => Get1<F, D>)
                  • (b): Get1<F, D>
                  • Parameters

                    • b: B

                    Returns Get1<F, D>

              Returns ((data) => Get1<F, Get2<T, C, D>>)

Generated using TypeDoc