Pull.next.grow: def of emerging-ezjson@1.3.0.0 Import: import emerging-ezjson@1.3.0.0/src/pull.bend as Pull Lines 1555-1565 of emerging-ezjson@1.3.0.0/src/pull.bend: https://jend.leeeet.dev/read.txt?path=emerging-ezjson@1.3.0.0/src/pull.bend&start_line=1555&end_line=1565 import Base # a walk that runs level `lvl`, then the next level up, until it finishes or # `left` levels are done. Most events finish at level 0, one step's budget, so # a walk pays for the levels only when it jumps many times def next.grow(left: Nat, +lvl: Nat, res: Out) -> Out: match left res: case 1n+pp More{txt, st}: next.grow(pp, 1n+lvl, next.run(lvl, More{txt, st})) case _ More{txt, st}: More{txt, st} case _ Fin{got}: Fin{got} Uses (3): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=emerging-ezjson@1.3.0.0/src/pull.bend&name=Out https://jend.leeeet.dev/definition.txt?path=emerging-ezjson@1.3.0.0/src/pull.bend&name=next.run