Exemple #1
0
 public static Optional <T> Of <T>(T value)
 {
     return((object)value == null?None.Of <T>() : Some.Of(value));
 }
Exemple #2
0
        public static Await <Result <T>[]> All <T>(params Await <T>[] sources)
        {
            var results = new Result <T> [sources.Length];

            return(Many((x, i) => None.Of <Result <T>[]>().Apply(_ => results[i] = x), results, sources));
        }