def run_acc

bend-collections@1.0.0.0 · src/containers/deque.bend:153

import bend-collections@1.0.0.0/src/containers/deque.bend as Deque
import 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))

Uses (6)

Used by (1)