Kind/book/U60/abs_diff.kind2
2024-07-05 10:06:49 -03:00

9 lines
143 B
Plaintext

use Bool/{true,false}
abs_diff (a: U48) (b: U48) : U48 =
let x = (U48/to_bool (< a b))
match x {
true: (- b a)
false: (- a b)
}