示例#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);