def head.of

ezx@1.11.0.0 · src/toml/toml.bend:263

import ezx@1.11.0.0/src/toml/toml.bend as Toml
import 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)

Uses (4)

Used by (1)