kotools / libraries

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

Overload the `toPositiveInt` function #122

Closed LVMVRQUXL closed 1 year ago

LVMVRQUXL commented 1 year ago

Description

Implement the following operation for converting a StrictlyPositiveInt to a PositiveInt:

fun StrictlyPositiveInt.toPositiveInt(): PositiveInt = TODO()

Checklist

LVMVRQUXL commented 1 year ago

The following operations will not be implemented:

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

Done.