def walk
import ezx@1.11.0.0/src/lock/plan.bend as Planimport Base
import ezx@1.11.0.0/src/lock/world.bend as W
import ezx@1.11.0.0/src/lock/lock.bend as L
183# every package the queue reaches, each one once. A walk that runs out of fuel
184# with the queue not empty is a refusal, never a lock of what it had so far.
185def walk(fuel: Nat, +orgs: List<&2, L.Origin>, +ns: List<&2, L.Name>, +js: List<&2, W.Judged>, +wk: Walk) -> Walk:
186 match fuel:
187 case 0n:
188 walk.out(walk.done(wk), wk)
189 case 1n+f:
190 walk.more(walk.done(wk), wk, now => walk(f, orgs, ns, js, walk.step(orgs, ns, js, now)))