コード例 #1
0
 public static Maybe <K> SelectMany <T, K>(this Maybe <T> maybe, Func <T, Maybe <K> > selector)
 {
     return(maybe.Bind(selector));
 }
コード例 #2
0
        public static async Task <Maybe <K> > Bind <T, K>(this Task <Maybe <T> > maybeTask, Func <T, Task <Maybe <K> > > selector)
        {
            Maybe <T> maybe = await maybeTask.DefaultAwait();

            return(await maybe.Bind(selector).DefaultAwait());
        }