def heads.head

emerging-eztoml@0.9.0.0 · main.bend:1984

import emerging-eztoml@0.9.0.0/main.bend as EmergingEztoml
import Base

1984# whether a table path was defined by a header
1985def heads.head(hs: List<&2, String>, +pp: String) -> Bool:
1986  match hs:
1987    case []:
1988      False{}
1989    case SCon{mark, h} <> t:
1990      heads.or(Bool.and(Char.is_eq(mark, '['), str.eq(h, pp)), heads.head(t, pp))
1991    case SNil{} <> t:
1992      heads.head(t, pp)

Uses (8)

Used by (1)