示例#1
0
        public static async Task <Lst <B> > Traverse <A, B>(this Lst <Task <A> > ma, Func <A, B> f)
        {
            var rb = await Task.WhenAll(ma.Map(async a => f(await a)));

            return(new Lst <B>(rb));
        }
示例#2
0
 public static HashSet <Lst <B> > Traverse <A, B>(this Lst <HashSet <A> > ma, Func <A, B> f) =>
 toHashSet(CollT.AllCombinationsOf(ma.Map(xs => xs.ToList()).ToSystemArray(), f)
           .Map(toList));
示例#3
0
 public static Arr <Lst <B> > Sequence <A, B>(this Lst <A> ta, Func <A, Arr <B> > f) =>
 ta.Map(f).Sequence();