kotest-fp / io.kotest.fp / Option / fold

fold

inline fun <R> fold(ifEmpty: () -> R, ifDefined: (T) -> R): R