map

fun <R : Any> map(desc: String? = null, f: (T) -> R): NonNullableOptionBuilder<R>(source)

Maps the parsed value using the specified transformation function. Preserves non-nullable type when transformation returns non-null.


fun <R : Any> map(desc: String? = null, f: (T) -> R?): OptionBuilder<R?>(source)

Maps the parsed value, allowing nullable output.