def Queue.pop_all
import bend-kube-runtime@0.2.0.0/src/queue.bend as Queueimport Base
137# Every key that may start now, in queue order (fuel bounds the count).
138def Queue.pop_all(fuel: Nat, +q: Queue, acc: List<&2, String>) -> Queue & List<&2, String>:
139 match fuel:
140 case 0n:
141 (q, List.reverse(&2, String, acc))
142 case 1n+p:
143 Queue.pop_all(p, Queue.pop_all.q(Queue.pop(q)), Queue.pop_all.acc(Queue.pop(q), acc))