Esempio n. 1
0
 public static IOption <T1> Select <T0, T1>(
     this IOption <T0> option,
     Func <T0, T1> selector)
 {
     return(option.Case(
                Option.None <T1>,
                value =>
                Option.Some(selector(value))));
 }
Esempio n. 2
0
            public override int Peek()
            {
                if (enumerator == null)
                {
                    throw new ObjectDisposedException("enumerator");
                }

                return(current.Case(
                           () => EOF,
                           value => (int)value));
            }