mapOrElse

inline fun <Element, Result> Maybe<Element>.mapOrElse(default: () -> Result, compute: (Element) -> Result): Result(source)

Computes the compute on the value and returns result of the computation if the value is present or just computes and returns default result otherwise.