/// <summary> /// Filters the specified sorted sequence on the specified predicate. /// </summary> public static ISortedEnumerable <TSource> WhereSorted <TSource>(this ISortedEnumerable <TSource> sequence, Func <TSource, bool> predicate) { Contract.Requires(sequence != null); Contract.Requires(predicate != null); return(new SortedEnumerable <TSource>(sequence.Where(predicate), sequence.Comparer)); }