EmergingEztoml.heads.head: def of emerging-eztoml@0.9.0.0 Import: import emerging-eztoml@0.9.0.0/main.bend as EmergingEztoml Lines 1984-1992 of emerging-eztoml@0.9.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=emerging-eztoml@0.9.0.0/main.bend&start_line=1984&end_line=1992 import Base # whether a table path was defined by a header def heads.head(hs: List<&2, String>, +pp: String) -> Bool: match hs: case []: False{} case SCon{mark, h} <> t: heads.or(Bool.and(Char.is_eq(mark, '['), str.eq(h, pp)), heads.head(t, pp)) case SNil{} <> t: heads.head(t, pp) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=emerging-eztoml@0.9.0.0/main.bend&name=heads.or https://jend.leeeet.dev/definition.txt?path=emerging-eztoml@0.9.0.0/main.bend&name=str.eq