kotools / libraries

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

Overload the `toNonZeroInt` function #121

Closed LVMVRQUXL closed 1 year ago

LVMVRQUXL commented 1 year ago

Description

Implement the following operations for converting the receiver type to a NonZeroInt:

fun StrictlyPositiveInt.toNonZeroInt(): NonZeroInt = TODO()
fun StrictlyNegativeInt.toNonZeroInt(): NonZeroInt = TODO()

Checklist

LVMVRQUXL commented 1 year ago

The following operations will not be implemented:

// Can be replaced by ExplicitInt.toInt().toNonZeroInt()
fun PositiveInt.toNonZeroInt(): Result<NonZeroInt> = TODO()
fun NegativeInt.toNonZeroInt(): Result<NonZeroInt> = TODO()
LVMVRQUXL commented 1 year ago

Done.