Beispiel #1
0
 public static Seq <Que <B> > Traverse <A, B>(this Que <Seq <A> > ma, Func <A, B> f) =>
 CollT.AllCombinationsOf(ma.Map(xs => xs.ToList()).ToArray(), f)
 .Map(toQueue)
 .ToSeq();
Beispiel #2
0
 public static Seq <IEnumerable <B> > Traverse <A, B>(this IEnumerable <Seq <A> > ma, Func <A, B> f) =>
 CollT.AllCombinationsOf(ma.Map(xs => xs.ToList()).ToArray(), f)
 .Map(xs => xs.AsEnumerable())
 .ToSeq();
Beispiel #3
0
 public static Seq <HashSet <B> > Traverse <A, B>(this HashSet <Seq <A> > ma, Func <A, B> f) =>
 CollT.AllCombinationsOf(ma.ToArray().Map(xs => xs.ToList()).ToArray(), f)
 .Map(toHashSet)
 .ToSeq();
Beispiel #4
0
 public static Seq <Lst <B> > Traverse <A, B>(this Lst <Seq <A> > ma, Func <A, B> f) =>
 CollT.AllCombinationsOf(ma.Map(xs => xs.ToList()).ToSystemArray(), f)
 .Map(toList)
 .ToSeq();
Beispiel #5
0
 public static Stck <IEnumerable <B> > Traverse <A, B>(this IEnumerable <Stck <A> > ma, Func <A, B> f) =>
 toStack(CollT.AllCombinationsOf(ma.Map(xs => xs.ToList()).ToArray(), f)
         .Map(xs => xs.AsEnumerable()));
Beispiel #6
0
 public static Stck <Set <B> > Traverse <A, B>(this Set <Stck <A> > ma, Func <A, B> f) =>
 toStack(CollT.AllCombinationsOf(ma.ToArray().Map(xs => xs.ToList()).ToArray(), f)
         .Map(toSet));
Beispiel #7
0
 public static Arr <Set <B> > Traverse <A, B>(this Set <Arr <A> > xxs, Func <A, B> f) =>
 CollT.AllCombinationsOf(xxs.Map(xs => xs.ToList()).ToArray(), f)
 .Map(toSet)
 .ToArr();
Beispiel #8
0
 public static Que <Lst <B> > Traverse <A, B>(this Lst <Que <A> > ma, Func <A, B> f) =>
 toQueue(CollT.AllCombinationsOf(ma.Map(xs => xs.ToList()).ToSystemArray(), f)
         .Map(toList));
Beispiel #9
0
 public static Lst <Set <B> > Traverse <A, B>(this Set <Lst <A> > ma, Func <A, B> f) =>
 CollT.AllCombinationsOf(ma.ToArray().Map(xs => xs.ToList()).ToArray(), f)
 .Map(toSet)
 .Freeze();
Beispiel #10
0
 public static Arr <IEnumerable <B> > Traverse <A, B>(this IEnumerable <Arr <A> > xxs, Func <A, B> f) =>
 CollT.AllCombinationsOf(xxs.Map(xs => xs.ToList()).ToArray(), f)
 .Map(xs => xs.AsEnumerable())
 .ToArr();
Beispiel #11
0
 public static Set <Arr <B> > Traverse <A, B>(this Arr <Set <A> > ma, Func <A, B> f) =>
 toSet(CollT.AllCombinationsOf(ma.Map(xs => xs.ToList()).ToArray(), f)
       .Map(toArray));
Beispiel #12
0
 public static Que <Stck <B> > Traverse <A, B>(this Stck <Que <A> > ma, Func <A, B> f) =>
 toQueue(CollT.AllCombinationsOf(ma.Reverse().Map(xs => xs.ToList()).ToArray(), f)
         .Map(toStack));
Beispiel #13
0
 public static Que <Seq <B> > Traverse <A, B>(this Seq <Que <A> > ma, Func <A, B> f) =>
 toQueue(CollT.AllCombinationsOf(ma.Map(xs => xs.ToList()).ToArray(), f)
         .Map(xs => Seq(xs)));
Beispiel #14
0
 public static Seq <Stck <B> > Traverse <A, B>(this Stck <Seq <A> > ma, Func <A, B> f) =>
 CollT.AllCombinationsOf(ma.Reverse().Map(xs => xs.ToList()).ToArray(), f)
 .Map(toStack)
 .ToSeq();
Beispiel #15
0
 public static Arr <Stck <B> > Traverse <A, B>(this Stck <Arr <A> > xxs, Func <A, B> f) =>
 CollT.AllCombinationsOf(xxs.Reverse().Map(xs => xs.ToList()).ToArray(), f)
 .Map(toStack)
 .ToArr();
Beispiel #16
0
 public static Que <HashSet <B> > Traverse <A, B>(this HashSet <Que <A> > ma, Func <A, B> f) =>
 toQueue(CollT.AllCombinationsOf(ma.ToArray().Map(xs => xs.ToList()).ToArray(), f)
         .Map(toHashSet));
Beispiel #17
0
 public static IEnumerable <Set <B> > Traverse <A, B>(this Set <IEnumerable <A> > ma, Func <A, B> f) =>
 CollT.AllCombinationsOf(ma.ToArray().Map(xs => xs.ToList()).ToArray(), f)
 .Map(toSet);