forProduct2<A, B, C> static method
/////////////////////////////////////////////////////////////////////////// /////////////////////////////// ProductN ////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
Implementation
static Codec<A> forProduct2<A, B, C>(
Codec<B> codecB,
Codec<C> codecC,
A Function(B, C) apply,
Tuple2<B, C> Function(A) tupled,
) =>
Codec(
Decoder.forProduct2(codecB.decoder, codecC.decoder, apply),
Encoder.forProduct2(codecB.encoder, codecC.encoder, tupled),
);