14 lines
370 B
Text
14 lines
370 B
Text
--| `max a b` returns the larger of `a` or `b`
|
|
let lessThanEqual = ./lessThanEqual.dhall
|
|
|
|
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
|