public static IEnumerable <T> ThenBy <T, U>(this OrderedSequence <T> seq, Func <T, U> criterium)
            where U : IComparable <U>
        {
            var a = seq.Elements.ToArray();
            var c = seq.Comparer;

            Array.Sort(a, (t1, t2) => c(t1, t2) + criterium(t1).CompareTo(criterium(t2)));

            return(a);
        }
        public static IEnumerable <T> OrderBy <T, U>(this IEnumerable <T> seq, Func <T, U> criterium)
            where U : IComparable <U>
        {
            OrderedSequence <T> sequence = new OrderedSequence <T>((t1, t2) => criterium(t1).CompareTo(criterium(t2)), seq);

            return(sequence);

            //var a = seq.ToArray();
            //Array.Sort(a, (t1, t2) => criterium(t1).CompareTo(criterium(t2)));
            //return a;
        }