diff --git a/packages_v5/example.candy b/packages_v5/example.candy index 27be9e7cd..fe208c794 100644 --- a/packages_v5/example.candy +++ b/packages_v5/example.candy @@ -558,11 +558,17 @@ fun xor(a: Bool, b: Bool) Bool { fun implies(a: Bool, b: Bool) Bool { not(a).or(b) } -impl Bool: Equal { - fun equals(self: Bool, other: Bool) Bool { +impl Bool: Compare { + fun compareTo(self: Bool, other: Bool) Ordering { switch self { - true => other, - false => other.not(), + false => switch other { + false => Ordering.equal(), + true => Ordering.less(), + }, + true => switch other { + false => Ordering.greater(), + true => Ordering.equal(), + }, } } }