+ ; `num_cmp x y lt eq gt` returns lt when x<y, eq when x==y, gt when x>y
+ let num_cmp = (\base build consume. \l r. r consume (l build base) fst)
+ ; where base is
+ (pair (\a b c. b) (K (\a b c. a)))
+ ; and build is
+ (\p. pair (\a b c. c) p)
+ ; and consume is
+ (\p. p fst p (p snd) (p snd)) in
+ let num_equal? = \x y. num_cmp x y false true false in