Exemplo n.º 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));
        }
Exemplo n.º 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));
Exemplo n.º 3
0
 public static Arr <Lst <B> > Sequence <A, B>(this Lst <A> ta, Func <A, Arr <B> > f) =>
 ta.Map(f).Sequence();