def leaf_pairs

cswap-bend-cli@0.1.0.0 · fmt/shape.bend:205

import cswap-bend-cli@0.1.0.0/fmt/shape.bend as Shape
import Base

205def leaf_pairs(ls: List<&2, Leaf>) -> List<&2, List<&2, String>>:
206  match ls:
207    case Nil{}:
208      []
209    case Con{Leaf{k, v}, t}:
210      [k, v] <> leaf_pairs(t)

Uses (3)

Used by (1)