Kotlin Options with functional operators
map
to return nullableorDefault
with lazy evaluationtryAsOption
a non-member functionSome
and None
package level entities. You can now refer to them without the Option
prefix.isSome
and isNone
. You could instead use Kotlin's is Some
or is None
comparisons.Iterable
extensions to allow filtering from Iterable<Option<T>>
to Iterable<T>
.Maybe
filterIfSome
optionOf
to package level functiontoNullable()
flatmap()
to flatMap()
id()
Makes Option.None
part of the API.