fact: Definition unfoldM' (y : B) (g : forall y' : B, r y' y -> M (seq A)) : M (seq A) := if p y then Ret [::] else f y >>= (fun xz => match Bool.bool_dec (r xz.2 y) true with | left H => fmap (cons xz.1) (g xz.2 H) | right H => Ret [::] end).
imports: mathcomp(all_ssreflect) imonae_lib HB(structures) ihierarchy imonad_lib Equations(Equations)