def opens

yaml-for-bend@0.1.1.0 · compose.bend:375

import yaml-for-bend@0.1.1.0/compose.bend as Compose
import Base

375# Whether a collection still open has the anchor +name+.
376def opens(stack: List<&2, Open>, +name: String) -> Bool:
377  match stack:
378    case Nil{}:
379      False{}
380    case Con{o, rest}:
381      match o:
382        case OSeq{anchor, tag, items, start, at}:
383          Bool.or(is_name(anchor, name), opens(rest, name))
384        case OMap{anchor, tag, items, start, at}:
385          Bool.or(is_name(anchor, name), opens(rest, name))

Uses (6)

Used by (1)