fact: Definition foldM `{Monad m} {A B : Type} (f : A -> B -> m A) (s : A) (l : list B) : m A := let fix go xs z := match xs with | nil => pure z | cons y ys => f z y >>= go ys end in go l s.
imports: Hask.Control.Applicative