operator * method

_ChainCompose22<Input1, Input2, Output, Input2, Output> operator *(
  1. Compose2<Input2, Output, Output> other(
    1. Output output,
    2. Input2 input2
    )
)

Chain two Compose2. The second operand must have inputs of type Output and Input2 and must return Output.

int sub(int a, int b) => a - b;

/// Compose operator ➕
final composeOperator2 = sub.c(4, 2) * sub.c;

// ((4 - 2) - 2) = (2 - 2) = 0
print(composeOperator2());

Implementation

_ChainCompose22<Input1, Input2, Output, Input2, Output> operator *(
  Compose2<Input2, Output, Output> Function(Output output, Input2 input2)
      other,
) =>
    c2((output, input2) => other(output, input2)(), _input2);