def same_go
import cli@0.2.0.0/cli.bend as Cliimport Base
1775# String.eq, without rebuilding both strings to hand them back; the walk
1776# stops at the first difference.
1777def same_go(a: String, b: String, same: Bool) -> Bool:
1778 match a b same:
1779 case SNil{} SNil{} done: done
1780 case SCon{x, xt} SCon{y, yt} True{}: same_go(xt, yt, Char.is_eq(x, y))
1781 case _ _ _: False{}