def leaf.pick
import cswap-bend-cli@0.1.0.0/fmt/shape.bend as Shapeimport Base
172def leaf.pick(empty: Bool, prefix: String, rest: List<&2, Leaf>) -> List<&2, Leaf>:
173 match empty:
174 case True{}:
175 Leaf{prefix, "{}"} <> rest
176 case False{}:
177 rest