def program.unflat

bend-lint-rules@0.2.0.0 · performance/eager_branch.bend:241

import bend-lint-rules@0.2.0.0/performance/eager_branch.bend as EagerBranch
import Base
import bend-lint-api@0.2.0.0/linter/lint.bend as Lint
import bend-lint-rules@0.2.0.0/performance/deep_call_in_fork.bend as Deep

241# The definitions of the program whose own body keeps them from compiling to a native loop, onto `out`: those of
242# `unflat`, and those that call themselves outside a tail position.
243def program.unflat(sources: List<&2, Lint.Source>, out: List<&2, String>) -> List<&2, String>:
244  match sources:
245    case Nil{}:
246      out
247    case Con{Lint.Source{path, ns, text, +nodes}, rest}:
248      program.unflat(rest, unflat(nodes, Deep.deep(nodes, True{}, out)))

Uses (6)

Used by (1)