dhall-nix-lib/Integer/compare.dhall

15 lines
587 B
Text

let lessThan =
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Integer/lessThan.dhall
sha256:eeaa0081d10c6c97464ef193c40f1aa5cbb12f0202972ab42f3d310c2fd6a3f0
let greaterThan =
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Integer/greaterThan.dhall
sha256:d23affd73029fc9aaf867c2c7b86510ca2802d3f0d1f3e1d1a93ffd87b7cb64b
let compare
: Integer → Integer → Integer
= λ(a : Integer) →
λ(b : Integer) →
if lessThan a b then -1 else if greaterThan a b then +1 else +0
in compare