def run_acc
import bend-collections@1.0.0.0/src/containers/deque.bend as Dequeimport Base
import bend-collections@1.0.0.0/src/containers/types/deque.bend as E
153# Runs ops left to right; observations are accumulated newest-first.
154def run_acc(~T: Data, ops: List<&2, E.Op<T>>, st: Deque<T> & List<&2, E.Obs<T>>) -> Deque<T> & List<&2, E.Obs<T>>:
155 match ops:
156 case Nil{}:
157 st
158 case Con{op, rest}:
159 run_acc(~T, rest, step_acc(~T, op, st))