Fold.chain: def of bend-toon-codec@0.1.0.0 Import: import bend-toon-codec@0.1.0.0/src/fold.bend as Fold Lines 102-108 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=102&end_line=108 import Base import bend-toon-codec@0.1.0.0/src/json.bend as J # Walk single-key objects from `v`, at most `budget` segments in all. def chain(+v: J.Json, +n: U32, +budget: U32, +key: String, +ok: Bool) -> Ci: match v: case J.JObj{J.JField{k2, v2, J.JNil{}}}: chain.step(U32.is_lt(n, budget), v, n, key, ok, chain(v2, (n + 1 : U32), budget, key ++ "." ++ k2, ok && ident(k2))) case _: Ci{n, key, v, ok} Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_lt https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/fold.bend&name=Ci https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/fold.bend&name=chain.step https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/fold.bend&name=ident https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/json.bend&name=Json