def sect.has

ezx@1.11.0.0 · src/ws/workspace.bend:512

import ezx@1.11.0.0/src/ws/workspace.bend as Workspace
import Base
import ezx@1.11.0.0/src/toml/toml.bend as T

512# whether a document has a section of this name
513def sect.has(ss: List<&2, T.Sect>, +name: String) -> Bool:
514  match ss:
515    case []:
516      False{}
517    case +hd <> tl:
518      rest = sect.has(tl, name)
519      Bool.or(String.eq(sect.name(hd), name), rest)

Uses (7)

Used by (2)