def map.piece
import cswap-bend-cli@0.1.0.0/fmt/yscal.bend as Yscalimport Base
import cswap-bend-cli@0.1.0.0/json.bend as Json
import cswap-bend-cli@0.1.0.0/fmt/ylex.bend as L
303def map.piece(kv: KV) -> L.JR():
304 match kv:
305 case KOk{k, rest}:
306 field.cons(k, atom(rest), Done{Json.JNil{}})
307 case KBad{m}:
308 Fail{m}
309 case KNone{}:
310 Fail{"expected key: value in a flow mapping"}