Пример #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);