fact: Fixpoint mapAccumL {A X Y : Type} (f : A → X → (A * Y)) (s : A) (v : list X) : A * list Y := match v with | nil => (s, nil) | x :: xs => let (s', y) := f s x in let (s'', ys) := mapAccumL f s' xs in (s'', y :: ys) end.
imports: Coq.Lists.List Equations(Equations) Equations.Type.EqDec Category.Lib Category.Theory.Coq.Functor Category.Theory.Coq.Applicative Category.Theory.Coq.Monad Category.Theory.Coq.Maybe Coq.Lists.List