match<C> abstract method

C match<C>(
  1. C onLeft(
    1. L l
    ),
  2. C onRight(
    1. R r
    )
)

Execute onLeft when value is Left, otherwise execute onRight.

Same as fold.

Implementation

C match<C>(C Function(L l) onLeft, C Function(R r) onRight);