Maybe

@Serializable
value class Maybe<out T>

A Serializable wrapper for Option to allow serialization of optional values.

Parameters

option

The Option value to be serialized.

Types

Link copied to clipboard
object Companion

Support extension functions.

Properties

Link copied to clipboard
val option: Option<T>

Functions

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