← Back to Kairo Docs|API Reference (Dokka)

transform

fun <T : Any, R : Any> Optional<T>.transform(block: (T?) -> R?): Optional<R>

Applies block to the inner value, preserving Optional.Missing state.


fun <T : Any, R : Any> Required<T>.transform(block: (T) -> R): Required<R>

Applies block to the inner value, preserving Required.Missing state.