Any particular reason why there's no `Flow<T&gt...
# coroutines
m
Any particular reason why there's no
Flow<T>.firstOrNull(): T?
Or did I miss it ?
Some discussion over there: https://github.com/Kotlin/kotlinx.coroutines/issues/1078#issuecomment-481346907. I guess it has to do with the fact that you can't distinguish an empty flow from a first null item but I'm still wrapping my head around that
d
You could restrict the type to
<T : Any>
👍 2