Category talk:Wren-seq: Difference between revisions
Content added Content deleted
(→Source code: Added Lst.prune method.) |
(→Source code: Added Lst.sortPart methods.) |
||
Line 391: | Line 391: | ||
return [a1, a2] |
return [a1, a2] |
||
} |
} |
||
// Extends the functionality of the built-in List.sort() method |
|||
// by allowing only part of 'a' from indices 'start' to 'end' inclusive |
|||
// to be sorted in place using 'comparer'. Returns 'a' after sorting. |
|||
static sortPart(a, start, end, comparer) { |
|||
isList_(a) |
|||
a.quicksort_(start, end, comparer) |
|||
return a |
|||
} |
|||
// As 'sortPart' above but uses the default comparer: {|i, j| i < j }. |
|||
static sortPart(a, start, end) { sortPart(a, start, end) {|i, j| i < j } } |
|||
} |
} |
||