def branch.at

bend-lint-rules@0.2.0.0 · performance/repeated_call.bend:101

import bend-lint-rules@0.2.0.0/performance/repeated_call.bend as RepeatedCall
import Base
import bend-lint-api@0.2.0.0/linter/lint.bend as Lint

101# Where a branch starts (a case has no place of its own: its first node with one), or 0 for a definition's body.
102def branch.at(b: Maybe<&2, Lint.Node>) -> U32:
103  match b:
104    case Some{node}:
105      first_beg(64n, [node])
106    case None{}:
107      0

Uses (5)

Used by (1)