defaultValFn<T> function

Some<T> defaultValFn <T>(
  1. Maybe<T> self,
  2. T fn(
      )
    )

    Set a default value when it is None

    but more lazy

    Implementation

    Some<T> defaultValFn<T>(Maybe<T> self, T fn()) {
      if (self is None) {
        return Some(fn());
      }
      return self;
    }