Lukasz Kalnik
07/01/2022, 3:11 PM!= null
Apart from the standard syntax:
myVal1 != null || myVal2 != null || myVal3 != null
This is ok, but I would like to write something more expressive, like:
listOf(myVal1, myVal2, myVal3).anyNotNull()
Lukasz Kalnik
07/01/2022, 3:14 PMOption
for this?Alejandro Serrano Mena
07/01/2022, 3:16 PMlistOf(myVal1, myVal2, myVal3).any { it != null }
would workLukasz Kalnik
07/01/2022, 3:16 PMLukasz Kalnik
07/01/2022, 3:16 PMAlejandro Serrano Mena
07/01/2022, 3:16 PMAlejandro Serrano Mena
07/01/2022, 3:17 PMlistOfNotNull(myVal1, myVal2, myVal3).isNotEmpty()
could workLukasz Kalnik
07/01/2022, 3:17 PM