Example #1
0
 public static IFilterBase <B> SelectMany <A, B>(this IFilterBase <A> filter, Func <A, IFilterBase <B> > f)
 {
     return(filter.Bind(f));
 }
Example #2
0
 public static IFilterBase <C> SelectMany <A, B, C>(this IFilterBase <A> filter, Func <A, IFilterBase <B> > bind, Func <A, B, C> select)
 {
     return(filter
            .Bind((a) => bind(a)
                  .Map((b) => select(a, b))));
 }
Example #3
0
 public static IFilterBase <B> Map <A, B>(this IFilterBase <A> filter, Func <A, B> f)
 {
     return(filter.Bind(x => Return(f(x))));
 }