kotools / libraries

Multiplatform libraries for expressive programming with Kotlin.
https://kotools.github.io/libraries
MIT License
0 stars 0 forks source link

Variants of `toStrictlyNegativeInt` function #142

Closed LVMVRQUXL closed 1 year ago

LVMVRQUXL commented 1 year ago

Description

Implement the following operations for improving the creation of a StrictlyNegativeInt type:

inline fun Int.toStrictlyNegativeIntOrElse(onFailure: (IllegalArgumentException) -> StrictlyNegativeInt): StrictlyNegativeInt = TODO()
fun Int.toStrictlyNegativeIntOrNull(): StrictlyNegativeInt? = TODO()
fun Int.toStrictlyNegativeIntOrThrow(): StrictlyNegativeInt = TODO()

Checklist