def heads.head
import emerging-eztoml@0.9.0.0/main.bend as EmergingEztomlimport 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)