public static ICompositeSet <TResult> Select <TSource, TResult> (this ICompositeSet <TSource> m , Func <TSource, TResult> f ) => m.Bind(x => { var data = new CompositeSourceSet <TResult>(); data.Source = data.Source.Add(f(x)); return(data); });
public static ICompositeSet <TResult> SelectMany <TSource, TICompositeSet, TResult> (this ICompositeSet <TSource> m , Func <TSource, ICompositeSet <TICompositeSet> > f , Func <TSource, TICompositeSet, TResult> g ) => m.Bind(x => f(x).Bind(y => { var data = new CompositeSourceSet <TResult>(); data.Source = data.Source.Add(g(x, y)); return(data); }));