defaultVal method

Maybe<T>? defaultVal(
  1. T v
)

Set a default value when it is None(null)

Implementation

Maybe<T> defaultVal(T v) {
  if (this == null) return Some(v);
  return this;
}