16 lines
535 B
Text
16 lines
535 B
Text
--| `min a b` returns the smaller of `a` or `b`
|
|
let lessThanEqual =
|
|
https://raw.githubusercontent.com/dhall-lang/dhall-lang/v22.0.0/Prelude/Integer/lessThanEqual.dhall
|
|
sha256:e3cca9f3942f81fa78a2bea23c0c24519c67cfe438116c38e797e12dcd26f6bc
|
|
|
|
let min
|
|
: Integer → Integer → Integer
|
|
= λ(a : Integer) → λ(b : Integer) → if lessThanEqual a b then a else b
|
|
|
|
let example0 = assert : min +1 +2 ≡ +1
|
|
|
|
let example1 = assert : min +2 +1 ≡ +1
|
|
|
|
let property0 = λ(n : Integer) → assert : min n n ≡ n
|
|
|
|
in min
|