Lock.seen.holds: def of ezx@1.13.0.0 Import: import ezx@1.13.0.0/src/lock/lock.bend as Lock Lines 411-420 of ezx@1.13.0.0/src/lock/lock.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.13.0.0/src/lock/lock.bend&start_line=411&end_line=420 import Base # whether a name is already among the ones a walk has seen. Base's # `List.contains` applies an erased equality, which Bend's termination check # cannot see through; this scan is structural. `any.step` is what lets it # stop at the name it was looking for instead of reading past it. def seen.holds(xs: List<&2, String>, +needle: String) -> Bool: match xs: case []: False{} case +h <> t: any.step(String.eq(h, needle), _u => seen.holds(t, needle)) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq https://jend.leeeet.dev/definition.txt?path=ezx@1.13.0.0/src/lock/lock.bend&name=any.step