Yamlr.val: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/fmt/yamlr.bend as Yamlr Lines 295-312 of cswap-bend-cli@0.1.0.0/fmt/yamlr.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/fmt/yamlr.bend&start_line=295&end_line=312 import Base import cswap-bend-cli@0.1.0.0/json.bend as Json import cswap-bend-cli@0.1.0.0/fmt/yscal.bend as S def val(fuel: Nat, pl: Plan) -> Result<&2, &2, String, Json.Json>: match fuel pl: case 0n _: Fail{"nesting too deep"} case 1n++p PRes{r}: r case 1n++p PBlk{ls}: val(p, plan.blk(ls)) case 1n++p PArr{es}: S.wrap.arr(val(p, plan.items(es))) case 1n++p PObj{es}: S.wrap.obj(val(p, plan.fields(es))) case 1n++p PItems{b, r}: item.cons(val(p, PBlk{b}), val(p, plan.items(r))) case 1n++p PFieldI{k, v, r}: S.field.cons(k, v, val(p, plan.fields(r))) case 1n++p PFieldB{k, b, r}: S.field.cons(k, val(p, PBlk{b}), val(p, plan.fields(r))) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fmt/yamlr.bend&name=Plan https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fmt/yamlr.bend&name=item.cons https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fmt/yamlr.bend&name=plan.blk https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fmt/yamlr.bend&name=plan.fields https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fmt/yamlr.bend&name=plan.items https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fmt/yscal.bend&name=field.cons https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fmt/yscal.bend&name=wrap.arr https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fmt/yscal.bend&name=wrap.obj https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json.bend&name=Json