fillWhenNone method

Maybe<t> fillWhenNone(
  1. t value
)
inherited

In case this is None, add the value, resulting in a Just, otherwise keep the current value.

Implementation

Maybe<T> fillWhenNone(T value) =>
    _self.visit<Maybe<T>>(just: (_) => _self, none: () => Just(value));