Bind.same: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/syntax/bind.bend as Bind Lines 226-237 of bolt@1.27.0.0/src/syntax/bind.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/syntax/bind.bend&start_line=226&end_line=237 import Base import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy # two names alike, char by char, stopping at the first that differs: # String.eq, without the pairs String.cmp builds on every step def same(aa: String, bb: String) -> Bool: match aa bb: case SNil{} SNil{}: True{} case SNil{} SCon{_h2, _t2}: False{} case SCon{_h1, _t1} SNil{}: False{} case SCon{h1, t1} SCon{h2, t2}: Lazy.and_then(Char.is_eq(h1, h2), _u => same(t1, t2)) Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lazy/lazy.bend&name=and_then