public static Producer <RT, OUT, B> SelectMany <RT, OUT, A, B>(this Producer <OUT, A> ma, Func <A, Aff <RT, B> > f) where RT : struct, HasCancel <RT> => from a in ma.Interpret <RT>() from b in Producer.lift <RT, OUT, B>(f(a)) select b;
public static Producer <RT, OUT, C> SelectMany <RT, OUT, A, B, C>(this Producer <OUT, A> ma, Func <A, Eff <RT, B> > f, Func <A, B, C> project) where RT : struct, HasCancel <RT> => from a in ma.Interpret <RT>() from b in Producer.lift <RT, OUT, B>(f(a)) select project(a, b);