Representing natural numbers (>=0).
This module lets you represent exact values in the NNat type.
This means, packages like elm-n-array can use a NNat to promise:
fromRepeating : NNat n -> element -> NArray n element→ repeating an element n times gives a Array with n elements!
The other use is to describe a difference between two values.
interval :
{ first : NNat (N first Is (Difference range To last))
, last : NNat (N last Is lastDifference)
}
-> Interval→ because range is 0 or positive, last must also be at least as high as first.
See the readme for more information.
Convert a NNat to an Int.
NNat.n4 |> NNat.toInt
--> 4The NNat plus 1.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat plus 10.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat plus 11.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat plus 12.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat plus 13.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat plus 14.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat plus 15.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat plus 16.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat plus 2.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat plus 3.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat plus 4.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat plus 5.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat plus 6.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat plus 7.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat plus 8.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat plus 9.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat minus 1.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat minus 10.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat minus 11.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat minus 12.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat minus 13.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat minus 14.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat minus 15.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat minus 16.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat minus 2.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat minus 3.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat minus 4.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat minus 5.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat minus 6.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat minus 7.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat minus 8.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
The NNat minus 9.
Keep in mind, that if you want do calculations, rather go for nat-in-range.
A natural number (
<= 0), where you know the exact value.NNat.n3is of typeThis means, its exact value can be described as
N3Natthe
Diffenceof someatoaplus 3.