Beispiel #1
0
        public static IMaybe <T> FirstOrNone <T>(this IEnumerable <T> enumerable)
        {
            try
            {
                var first = enumerable.FirstOrDefault();

                if (first.IsNull())
                {
                    return(MonadFunctions.none <T>());
                }
                else if (first.Equals(default))
Beispiel #2
0
 public Matching(IMatched <T> matched)
 {
     this.matched = matched;
     action       = MonadFunctions.none <Func <TResult> >();
 }