match<A, L, R> function

A Function(Either<L, R> either) match<A, L, R>({
  1. required A left(
    1. L
    ),
  2. required A right(
    1. R
    ),
})

Implementation

A Function(
  Either<L, R> either,
) match<A, L, R>({
  required A Function(L) left,
  required A Function(R) right,
}) =>
    (either) => switch (either) {
          Left(value: final value) => left(value),
          Right(value: final value) => right(value)
        };