/Prelude-v23.0.0/Integer/clamp.dhall
Copy path to clipboardConvert an Integer
to a Natural
number, with negative numbers becoming zero.
Examples
clamp +7 ≡ 7
clamp +0 ≡ 0
clamp -3 ≡ 0
Convert an Integer
to a Natural
number, with negative numbers becoming zero.
clamp +7 ≡ 7
clamp +0 ≡ 0
clamp -3 ≡ 0