dhall-nix-lib/Integer/greaterThan.dhall

24 lines
654 B
Text

--| `greaterThan` checks if one Integer is greater than another.
let Bool/not = ../Bool/not.dhall
let lessThanEqual = ./lessThanEqual.dhall
let greaterThan
: Integer → Integer → Bool
= λ(x : Integer) → λ(y : Integer) → Bool/not (lessThanEqual x y)
let example0 = assert : greaterThan +5 +6 ≡ False
let example1 = assert : greaterThan +5 +5 ≡ False
let example2 = assert : greaterThan +5 +4 ≡ True
let example3 = assert : greaterThan -5 +8 ≡ False
let example4 = assert : greaterThan -5 -3 ≡ False
let example5 = assert : greaterThan -3 -5 ≡ True
let example6 = assert : greaterThan -3 -3 ≡ False
in greaterThan