flatten method

Maybe<T>? flatten()

Converts from Maybe<Maybe<T>> to Maybe<T>

Implementation

Maybe<T> flatten() {
  if (this == null)
    return None();
  else
    return this!.value;
}