def next.run
import emerging-ezjson@1.3.0.0/src/pull.bend as Pullimport Base
1544# a walk with a budget of 2^lvl jumps: one step's budget at depth 0, and
1545# the budget below it twice otherwise. A finished step passes through
1546def next.run(lvl: Nat, res: Out) -> Out:
1547 match lvl res:
1548 case 0n More{txt, st}:
1549 next.go(next.leaf(), txt, st)
1550 case 1n+(+pp) More{txt, st}:
1551 next.run(pp, next.run(pp, More{txt, st}))
1552 case _ Fin{got}:
1553 Fin{got}