orElse method

Maybe<T>? orElse(
  1. Maybe<T>? f()
)

Returns this if this contains a value, otherwise calls f and returns the result

Implementation

Maybe<T> orElse(Maybe<T> f()) {
  if (this == null) return f();
  return this;
}