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