Fold.foldf: def of bend-toon-codec@0.1.0.0 Import: import bend-toon-codec@0.1.0.0/src/fold.bend as Fold Lines 213-223 of bend-toon-codec@0.1.0.0/src/fold.bend: https://jend.leeeet.dev/read.txt?path=bend-toon-codec@0.1.0.0/src/fold.bend&start_line=213&end_line=223 import Base import bend-toon-codec@0.1.0.0/src/json.bend as J # `fs` is a field chain. `budget` is the segments still allowed, `prefix` the # dotted path of the object so far, `rl` the literal dotted keys at root. def foldf(+fuel: Nat, +fs: J.Json, +sibs: List<&2, String>, +budget: U32, +prefix: String, +rl: List<&2, String>) -> J.Json: match fuel fs: case 0n _: fs case 1n+p J.JField{k, v, t}: +pl : Plan = plan(k, v, sibs, budget, prefix, rl) field.mk(pl, foldf(p, plan.fs(pl), plan.sibs(pl), plan.nb(pl), plan.np(pl), rl), foldf(p, t, sibs, budget, prefix, rl)) case 1n+p _: fs Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/fold.bend&name=Plan https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/fold.bend&name=field.mk https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/fold.bend&name=plan https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/fold.bend&name=plan.fs https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/fold.bend&name=plan.nb https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/fold.bend&name=plan.np https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/fold.bend&name=plan.sibs https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/json.bend&name=Json