compose<A, B, C> static method

BiDi<A, C> compose<A, B, C>({
  1. required BiDi<A, B> aToB,
  2. required BiDi<B, C> bToC,
})

Implementation

static BiDi<A, C> compose<A, B, C>({
  required BiDi<A, B> aToB,
  required BiDi<B, C> bToC,
}) =>
    BiDi(
      forward: (a) => bToC.forward(aToB.forward(a)),
      backward: (c) => aToB.backward(bToC.backward(c)),
    );