def find

bolt@1.27.0.0 · src/rules/suspicious/concat.bend:90

import bolt@1.27.0.0/src/rules/suspicious/concat.bend as Concat
import Base
import bolt@1.27.0.0/src/syntax/lex.bend as Lex
import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy

90# what the nearest let of the name appends onto; nothing when no let binds it
91def find(lets: List<&2, Let>, +name: String) -> Maybe<&2, Lex.Tok>:
92  match lets:
93    case Nil{}:
94      None{}
95    case Con{Let{+nm, mm}, rest}:
96      Lazy.stop(Maybe<&2, Lex.Tok>, String.eq(nm, name), mm, _u => find(rest, name))

Uses (7)

Used by (1)