def leaf_pairs
import cswap-bend-cli@0.1.0.0/fmt/shape.bend as Shapeimport 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)