def head.of
import ezx@1.11.0.0/src/toml/toml.bend as Tomlimport Base
263# a header as ez names it: its segments, each bare or quoted, joined by dots
264def head.of(segs: List<&2, String>) -> String:
265 match segs:
266 case []:
267 ""
268 case +hd <> []:
269 key(hd)
270 case +hd <> tl:
271 key(hd) ++ "." ++ head.of(tl)