16 lines
493 B
Text
16 lines
493 B
Text
--| `max a b` returns the larger of `a` or `b`
|
|
let lessThanEqual =
|
|
https://prelude.dhall-lang.org/Integer/lessThanEqual.dhall
|
|
sha256:e3cca9f3942f81fa78a2bea23c0c24519c67cfe438116c38e797e12dcd26f6bc
|
|
|
|
let max
|
|
: Integer → Integer → Integer
|
|
= λ(a : Integer) → λ(b : Integer) → if lessThanEqual a b then b else a
|
|
|
|
let example0 = assert : max +1 +2 ≡ +2
|
|
|
|
let example1 = assert : max +2 +1 ≡ +2
|
|
|
|
let property0 = λ(n : Integer) → assert : max n n ≡ n
|
|
|
|
in max
|