def pop.rot
import bend-lawful-stdlib@0.1.0.0/src/queue.bend as Queueimport Base
import bend-lawful-stdlib@0.1.0.0/src/list.bend as List
32# front is empty; f is the reversed rear
33def pop.rot(-A: Data, f: List<&2, A>) -> List.Step<&1, A, Queue<A>>:
34 match f:
35 case Nil{}:
36 List.Stop{}
37 case h <> t:
38 List.Next{h, Queue{t, Nil{}}}