Exemplo n.º 1
0
 public static IRnd <IEnumerable <A> > TakeNoRepeat <A>(this IRnd <int> count, IRnd <A> rnd)
     where A : IEquatable <A>
 {
     return(count.SelectMany(i => i.TakeNoRepeat(rnd)));
 }
Exemplo n.º 2
0
 public static IRnd <B> SelectMany <A, B>(this IRnd <A> source, Func <A, IRnd <B> > func)
 {
     return(source.SelectMany(func, (_, b) => b));
 }
Exemplo n.º 3
0
 public static IRnd <IEnumerable <A> > Take <A>(this IRnd <int> count, IRnd <A> rnd)
 {
     return(count.SelectMany(i => rnd.Take(i)));
 }