def step.pop

ezx@1.11.0.0 · src/lock/plan.bend:133

import ezx@1.11.0.0/src/lock/plan.bend as Plan
import 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

133# the next hash of the queue, or the walk as it is when the queue is empty
134def step.pop(
135  +orgs: List<&2, L.Origin>,
136  +ns: List<&2, L.Name>,
137  +js: List<&2, W.Judged>,
138  queue: List<&2, String>,
139  +packs: List<&2, L.Pack>,
140  +asks: List<&2, String>,
141  bad: String
142) -> Walk:
143  match queue:
144    case []:
145      Walk{[], packs, asks, bad}
146    case +h <> t:
147      step.pick(Bool.or(L.has(packs, h), L.seen.holds(asks, h)), orgs, ns, js, h, t,
148        packs, asks, bad)

Uses (11)

Used by (1)