https://kotlinlang.org logo
Title
u

user

06/24/2022, 8:11 PM
Kotlin - ArrowCore ensureNotNull in either.eager? I can utilize ensure, but not ensureNotNull in this MRE validation function. I cannot create a suspend fun, so I need to be able to use either.eager. The ability to utilize this would drastically increase the readability for my code. fun isValid(integer: Int?): Either = either.eager { ensure(true) { Exception() } ensureNotNull(integer) { // Restricted suspending functions can only invoke member or extension suspending functions on their restricted coroutine scope....