static Maybe<E> flatten<E>(Maybe<Maybe<E>>? maybe) { if (maybe == null || maybe._isNothing) { return Maybe.nothing(); } return maybe._value!; }