Example #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();
Example #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();
Example #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();
Example #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();
Example #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()));
Example #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));
Example #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();
Example #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));
Example #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();
Example #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();
Example #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));
Example #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));
Example #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)));
Example #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();
Example #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();
Example #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));
Example #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);