forProduct2<A, B, C> static method

Decoder<A> forProduct2<A, B, C>(
  1. Decoder<B> decodeB,
  2. Decoder<C> decodeC,
  3. A fn(
    1. B,
    2. C
    )
)

/////////////////////////////////////////////////////////////////////////// /////////////////////////////// ProductN ////////////////////////////////// ///////////////////////////////////////////////////////////////////////////

Implementation

static Decoder<A> forProduct2<A, B, C>(
  Decoder<B> decodeB,
  Decoder<C> decodeC,
  A Function(B, C) fn,
) =>
    tuple2(decodeB, decodeC).map((t) => t.apply(fn));