def judge
bend-lint-rules@0.2.0.0 · language/reused_binder.bend:169
import bend-lint-rules@0.2.0.0/language/reused_binder.bend as ReusedBinder
import Base
import bend-lint-api@0.2.0.0/linter/lint.bend as Lint
import bend-lint-api@0.2.0.0/shared/lists.bend as Lists
169
170
171def judge(
172 +owner: Lint.Node,
173 onces: List<&2, Once>,
174 +matched: List<&2, U32>,
175 out: List<&2, Lint.Finding>
176) -> List<&2, Lint.Finding>:
177 match onces:
178 case Nil{}:
179 out
180 case Con{Once{+b, name}, rest}:
181 judge(
182 owner,
183 rest,
184 matched,
185 Lists.onto(
186 &2,
187 Lint.Finding,
188 judged(List.contains(~U32, ~U32.is_eq, matched, b), owner, b, name),
189 out
190 )
191 )