Rewalk.count: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/pedantic/rewalk.bend as Rewalk Lines 540-547 of bolt@1.27.0.0/src/rules/pedantic/rewalk.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/rules/pedantic/rewalk.bend&start_line=540&end_line=547 import Base # how many lets of this name take effect before this position def count(bs: List<&2, Bind>, +name: String, +line: U32, +col: U32) -> U32: match bs: case Nil{}: 0 case Con{Bind{+nm, +l, +c}, rest}: +more = count(rest, name, line, col) Bool.pick(U32, Bool.and(String.eq(nm, name), before(l, c, line, col)), (more + 1 : U32), more) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick 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=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/pedantic/rewalk.bend&name=Bind https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/pedantic/rewalk.bend&name=before