def i64.step
import emerging-eztoml@0.9.0.0/main.bend as EmergingEztomlimport Base
1686# a shorter digit string fits and a longer one does not. equal length uses
1687# digit order. the walk does not rebuild either string
1688def i64.step(+digits: String, +limit: String, ord: Cmp) -> Bool:
1689 match digits limit:
1690 case SNil{} SNil{}:
1691 Cmp.is_le(ord)
1692 case SNil{} SCon{_h, _t}:
1693 True{}
1694 case SCon{_h, _t} SNil{}:
1695 False{}
1696 case SCon{x, xt} SCon{y, yt}:
1697 i64.step(xt, yt, i64.ord(ord, U32.cmp(Char.to_u32(x), Char.to_u32(y))))