def is_passed
bend-lint-rules@0.2.0.0 · performance/list_index_loop.bend:116
import bend-lint-rules@0.2.0.0/performance/list_index_loop.bend as ListIndexLoop
import Base
import bend-lint-api@0.2.0.0/linter/lint.bend as Lint
116
117def is_passed(args: List<&2, Lint.Node>, +b: U32, found: Bool) -> Bool:
118 match args found:
119 case _ True{}:
120 True{}
121 case Nil{} False{}:
122 False{}
123 case Con{Lint.Node{Lint.Variable{v}, n, s, k, f}, rest} False{}:
124 is_passed(rest, b, U32.is_eq(v, b))
125 case Con{arg, rest} False{}:
126 is_passed(rest, b, False{})