Talking about Option, what are the solutions in Ar...
# arrow
m
Talking about Option, what are the solutions in Arrow for this issue?: https://discuss.kotlinlang.org/t/kotlin-null-check-for-multiple-nullable-vars/1946
a
you have mapN for nullables
👍 1
k
there is also a
nullable
continuation in case you are looking to express some logic inside the function.
Copy code
fun test() = nullable {
    val name = name.invoke()
    val age = age.invoke()
    doSth(name, age)
}
IE: few examples in arrow-core as well: https://github.com/arrow-kt/arrow-core/blob/0a5a0a94dc5d855d38b2959489bbeb4fdc9c16d6/arrow-core-data/src/test/kotlin/arrow/core/computations/NullableTest.kt
☝️ 1
👍 1
🔝 1
m
I see nullable is not released yet, but mapN is 🙂
👍 1