fact: Definition StateT_ap `{Monad m} {s : Type} {a b : Type} (mf : StateT s m (a -> b)) (mx : StateT s m a) : StateT s m b := fun st => p <- mf st; match p with (st', f) => p <- mx st'; match p with (st'', x) => pure (st'', f x) end end.
imports: Hask.Ltac Hask.Control.Monad