Esempio n. 1
0
 private static Task <string> Process(OneOf <string, int> input)
 {
     return(input
            .Map(
                x => Task.FromResult(x + "!"),
                x => Task.FromResult(x + 1)
                )
            .Map(
                x => x + "$$",
                x => x * 4
                )
            .Extract(
                a => a,
                b => b.ToString()
                ));
 }