public static Option <T> TryAggregate <T>(this IEnumerable <T> self, Func <T, T, T> aggregator) { return(Option <T> .Try(() => self.Aggregate(aggregator))); }
public static Option <T> TryElementAt <T>(this IEnumerable <T> self, int index) { return(Option <T> .Try(() => self.ElementAt(index))); }
public static Option <T> TryLast <T>(this IEnumerable <T> self, Func <T, bool> predicate) { return(Option <T> .Try(() => self.Last(predicate))); }