def levels

bolt@1.26.0.0 · src/config.bend:122

import bolt@1.26.0.0/src/config.bend as Config
import Base

122# each setting as the level it sets its name to
123def levels(ss: List<&2, Setting>) -> List<&2, LevelSet>:
124  match ss:
125    case Nil{}:
126      Nil{}
127    case Con{Setting{n, w, _line}, rest}:
128      LevelSet{n, of_word(w)} <> levels(rest)

Uses (4)

Used by (1)