def has_item

bolt@1.27.0.0 · src/syntax/bind.bend:239

import bolt@1.27.0.0/src/syntax/bind.bend as Bind
import Base
import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy

239# is the name among the file's items? `has`, stopping at the first hit, as
240# every use no binder holds asks it of every item
241def has_item(names: List<&2, String>, +name: String) -> Bool:
242  match names:
243    case Nil{}:
244      False{}
245    case Con{hh, rest}:
246      Lazy.or_else(same(hh, name), _u => has_item(rest, name))

Uses (5)

Used by (1)