mapOrDefault

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

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