def defs
bend-lint-rules@0.2.0.0 · performance/deep_call_in_fork.bend:224
import bend-lint-rules@0.2.0.0/performance/deep_call_in_fork.bend as DeepCallInFork
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
224def defs(
225 nodes: List<&2, Lint.Node>,
226 +deeps: List<&2, String>,
227 out: List<&2, Lint.Finding>
228) -> List<&2, Lint.Finding>:
229 match nodes:
230 case Nil{}:
231 List.reverse(&2, Lint.Finding, out)
232 case Con{Lint.Node{Lint.Definition{+t, u}, +n, s, k, f}, rest}:
233 defs(
234 rest,
235 deeps,
236 Lists.onto(
237 &2,
238 Lint.Finding,
239 Lint.visit(
240 ~Owner,
241 ~Lint.Finding,
242 ~visit,
243 Owner{deeps, t, n},
244 [Lint.Node{Lint.Definition{t, u}, n, s, k, f}]
245 ),
246 out
247 )
248 )
249 case Con{node, rest}:
250 defs(rest, deeps, out)