def any_item

bolt@1.27.0.0 · src/rules/laws/law.bend:106

import bolt@1.27.0.0/src/rules/laws/law.bend as Law
import Base
import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy
import bolt@1.27.0.0/src/rules/imports.bend as Imports

106# a type's constructors: is one of them reached?
107def any_item(ns: List<&2, String>, +cl: List<&2, String>, +pp: String) -> Bool:
108  match ns:
109    case Nil{}:
110      False{}
111    case Con{name, rest}:
112      Lazy.or_else(Imports.has(cl, key(pp, name)), _u => any_item(rest, cl, pp))

Uses (6)

Used by (1)