Companion

object Companion

Support extension functions.

Properties

Link copied to clipboard

The Maybe with no value.

Functions

Link copied to clipboard
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.

Link copied to clipboard
fun <T> Option<T>.serializable(): Maybe<T>

Creates a Maybe from an Option.

Link copied to clipboard
fun <T> some(value: T): Maybe<T>

Creates a Maybe from an existing value.