<https://twitter.com/kotlin/status/138452174572664...
# announcements
u
https://twitter.com/kotlin/status/1384521745726640128 Kotlin 1.5 introduces new functions on collections: firstNotNullOf(OrNull). They transform each element one by one, and return the first non-null result. If no such result exists, firstNotNullOf throws an exception, *OrNull returns null. #KotlinTips https://t.co/xGihNsx8Fv Twitter
j
this is the greatest function name I have seen in a long time
😂 1
firstNotNullOfOrNull
is a proper mouthful
r
Right up there with
AbstractSingletonProxyFactoryBean
.
1
m
I like it. It’s cool that the name was chosen for consistency with the other method names instead of opting for a shorter name. If anything, it serves as an incentive to avoid nullable types, in which case it doesn’t need to be used. 🙂
m
oh my... i wrote something similar usong high order functions haha
i