def internal_order_cmp_go
bend-mathlib@0.8.1.0 · string.bend:225
import bend-mathlib@0.8.1.0/string.bend as String
import Base
225def internal_order_cmp_go(+a: String, +b: String) -> {String.order(a, b) == Pair.snd(String & String, Cmp, String.cmp(a, b)) : Cmp}:
226 match a b:
227 case SNil{} SNil{}:
228 {==}
229 case SNil{} SCon{h, t}:
230 {==}
231 case SCon{h, t} SNil{}:
232 {==}
233 case SCon{Chr{x}, t1} SCon{Chr{y}, t2}:
234 internal_order_step(t1, t2, Chr{x}, Chr{y}, U32.cmp(x, y), internal_order_cmp_go(t1, t2))