def Queue.pop_all

bend-kube-runtime@0.2.0.0 · src/queue.bend:137

import bend-kube-runtime@0.2.0.0/src/queue.bend as Queue
import 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))

Uses (10)

Used by (1)