Convert a Nat to an Int.
nat4 |> Nat.toInt --> 4
Nat.N.toIn nat4 |> Nat.toInt --> 4
Nat.N.toMin nat4 |> Nat.toInt --> 4
compare a b =
compare (Nat.toInt a) (Nat.toInt b)The greater of 2 Nats. Works just like Basics.max.
Nat.theGreater
(nat3 |> Nat.N.toMin)
(nat4 |> Nat.N.toMin |> Nat.Min.lowerMin (nat3 |> Nat.N.toIn))
--> Nat 4The smaller of 2 Nats. Works just like Basics.min.
Nat.theSmaller
(nat3 |> Nat.N.toMin)
(nat4 |> Nat.N.toMin |> Nat.Min.lowerMin (nat3 |> Nat.N.toIn))
--> Nat 3
A bounded natural number (
>= 0).