asSequence

Returns a new sequence for this Optional's value if present, or otherwise an empty sequence. The returned set is serializable (JVM).

Since Kotlin

1.7