String.order.go: def of Base Import: import Base Lines 2053-2064 of Base/base.bend: https://jend.leeeet.dev/read.txt?path=Base/base.bend&start_line=2053&end_line=2064 import Base # c is the order of the chars so far: the walk is one tail call per char # and builds nothing (String.cmp rebuilds both strings for its callers). def String.order.go(a: String, b: String, c: Cmp) -> Cmp: match a b c: case SNil{} SCon{h, t} EQ{}: LT{} case SCon{h, t} SNil{} EQ{}: GT{} case SCon{Chr{x}, t1} SCon{Chr{y}, t2} EQ{}: String.order.go(t1, t2, U32.cmp(x, y)) case _ _ o: o Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Cmp https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.cmp