dhall-nix-lib/Integer/compare.dhall

16 lines
587 B
Text
Raw Normal View History

2022-09-08 18:49:47 +00:00
let lessThan =
2022-09-14 14:51:57 +00:00
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Integer/lessThan.dhall
2022-09-08 18:49:47 +00:00
sha256:eeaa0081d10c6c97464ef193c40f1aa5cbb12f0202972ab42f3d310c2fd6a3f0
let greaterThan =
2022-09-14 14:51:57 +00:00
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Integer/greaterThan.dhall
2022-09-08 18:49:47 +00:00
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