Convert a Nat to an Int.
nat4 |> Nat.toInt --> 4
nat4 |> Nat.N.toIn |> Nat.toInt --> 4
nat4 |> Nat.N.toMin |> Nat.toInt --> 4
compare : Nat range -> Nat range -> Order
compare a b =
compare (Nat.toInt a) (Nat.toInt b)Use the Int values of two Nats to return a result.
Nat.bi (>=) nat5 nat4 --> True
Nat.bi (>=) nat5 nat40 --> FalseNote, that you must give the Nats in the same order you would give Ints.
Don't overuse this.
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).