## /Prelude-v23.0.0/Integer/lessThanEqual.dhall

Copy path to clipboard

`lessThanEqual` checks if one Integer is less than or equal to another.

### Examples

`lessThanEqual +5 +6 ≡ True`
`lessThanEqual +5 +5 ≡ True`
`lessThanEqual +5 +4 ≡ False`
`lessThanEqual -5 +8 ≡ True`
`lessThanEqual -5 -3 ≡ True`
`lessThanEqual -3 -5 ≡ False`
`lessThanEqual -3 -3 ≡ True`

### Source

```--| `lessThanEqual` checks if one Integer is less than or equal to another.let Natural/greaterThanEqual =        missing
sha256:30ebfab0febd7aa0ccccfdf3dc36ee6d50f0117f35dd4a9b034750b7e885a1a4      ? ../Natural/greaterThanEqual.dhalllet Natural/lessThanEqual =        missing
sha256:1a5caa2b80a42b9f58fff58e47ac0d9a9946d0b2d36c54034b8ddfe3cb0f3c99      ? ../Natural/lessThanEqual.dhalllet nonPositive =        missing
sha256:e00a852eed5b84ff60487097d8aadce53c9e5301f53ff4954044bd68949fac3b      ? ./nonPositive.dhalllet nonNegative =        missing
sha256:b463373f070df6b1c8c7082051e0810fee38b360bab35256187c8c2b6af5c663      ? ./nonNegative.dhalllet lessThanEqual    : Integer → Integer → Bool    = λ(x : Integer) →      λ(y : Integer) →        if    nonPositive x        then      nonNegative y              ||  Natural/greaterThanEqual                    (Integer/clamp (Integer/negate x))                    (Integer/clamp (Integer/negate y))        else  Natural/lessThanEqual (Integer/clamp x) (Integer/clamp y)let example0 = assert : lessThanEqual +5 +6 ≡ Truelet example1 = assert : lessThanEqual +5 +5 ≡ Truelet example2 = assert : lessThanEqual +5 +4 ≡ Falselet example3 = assert : lessThanEqual -5 +8 ≡ Truelet example4 = assert : lessThanEqual -5 -3 ≡ Truelet example5 = assert : lessThanEqual -3 -5 ≡ Falselet example6 = assert : lessThanEqual -3 -3 ≡ Truein  lessThanEqual```