:wave: Coming from Scala I found myself missing w...
# arrow
r
đź‘‹ Coming from Scala I found myself missing wanting the
find
and
get
methods on collections to return Options. Whilst I found Kategory added some extensions e.g.
getOption
those methods don’t seem to exist for all nullable returning collections methods. So I found myself writing the following extension method:
Copy code
fun <T> T?.toOpt(): Option<T> {
        return Option.fromNullable(this)
    }
I feel like I must be doing something wrong! Is there a method like this in Kategory? Or should I be embracing
nullable
? … ahh just seen this: https://github.com/kategory/kategory/issues/432