src/lib/collections/list.js
function (indexOrComparer, count, comparer) {
        var index = isNumber(indexOrComparer) ? indexOrComparer : 0,
            total = count || this.length - index,
            comparision = indexOrComparer === null ? null :
                (isFunction(indexOrComparer) ? indexOrComparer :
                    Comparer.from(comparer || indexOrComparer).compare);

        validateListIndex(this, index + total - 1);

        var arr = this.slice(index, index + total).sort(comparision),
            len = arr.length;

        while (len-- > 0) {
            this[len + index] = arr[len];
        }
    }
function (indexOrComparer, count, comparer) {
        var index = isNumber(indexOrComparer) ? indexOrComparer : 0,
            total = count || this.length - index,
            comparision = indexOrComparer === null ? null :
                (isFunction(indexOrComparer) ? indexOrComparer :
                    Comparer.from(comparer || indexOrComparer).compare);

        validateListIndex(this, index + total - 1);

        var arr = this.slice(index, index + total).sort(comparision),
            len = arr.length;

        while (len-- > 0) {
            this[len + index] = arr[len];
        }
    }
function ( indexOrComparer , count , comparer ) { var index = isNumber ( indexOrComparer ) ? indexOrComparer : 0 , total = count || this . length - index , comparision = indexOrComparer === null ? null : ( isFunction ( indexOrComparer ) ? indexOrComparer : Comparer . from ( comparer || indexOrComparer ) . compare ) ; validateListIndex ( this , index + total - 1 ) ; var arr = this . slice ( index , index + total ) . sort ( comparision ) , len = arr . length ; while ( len -- > 0 ) { this [ len + index ] = arr [ len ] ; } }
Sorts the elements in a range of elements in List using the specified comparer.
@param {Number|Function|Comparer} val The starting index, the comparison function or the Comparer.
@param {Number=} count The length of the range to sort.
@param {Comparer=} comparer The Comparer implementation to use when comparing elements.
Sorts the elements in a range of elements in List using the specified comparer .