merge

inline fun <T> Option<T>.merge(other: Option<T>, crossinline combiner: (T, T) -> T): Option<T>

Merges two Options into one. If both are Some, the combiner function is applied to their values. If one of them is None, the other is returned.


inline fun <T> Maybe<T>.merge(other: Maybe<T>, crossinline combiner: (T, T) -> T): Maybe<T>

Merges two Maybes into one. If both are Some, the combiner function is applied to their values. If one of them is None, the other is returned.