fold<B> method

  1. @override
B fold<B>(
  1. B onSome(
    1. T value
    ),
  2. B onNone()
)
override

Fold is used to handle both Some and None cases.

Implementation

@override
B fold<B>(B Function(T value) onSome, B Function() onNone) => onNone();