match<B> method

  1. @override
B match<B>(
  1. B onNone(
      ),
    1. B onSome(
      1. Never t
      )
    )
    override

    Execute onSome when value is Some, otherwise execute onNone.

    [🍌].match(() => 🍎, (🍌) => 🍌 * 2) -> 🍌🍌
    [_].match(() => 🍎, (🍌) => 🍌 * 2) -> 🍎
    

    Same as fold.

    Implementation

    @override
    B match<B>(B Function() onNone, B Function(Never t) onSome) => onNone();