def value

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

import ezx@1.11.0.0/src/toml/toml.bend as Toml
import Base

37# the value written for a key in a table, or "" when it is absent. The scan
38# recurses first and picks after, so no recursive call hides inside a branch.
39def value(pairs: List<&2, Kv>, +key: String) -> String:
40  match pairs:
41    case []:
42      ""
43    case hd <> tl:
44      value.at(hd, value(tl, key), key)

Uses (4)

Used by (7)