Category talk:Wren-sort: Difference between revisions
m
→Source code: Changed a method name.
(Copied over source code from previous 'sort' module talk page.) |
m (→Source code: Changed a method name.) |
||
Line 419:
static highest(a) { highest(a, false) }
// Finds the
// Returns a list of three items:
// The first item is a list of the
// The second item is the number of
// The third item is the range of indices at which the
static
Sort.isList_(a)
var c = a.count
if (c == 0) Fiber.abort("An empty list does not have a
var hc = (c/2).floor
return (c%2 == 1) ? [[a[hc]], 1, hc..hc] : [[a[hc-1], a[hc]], 2, hc-1..hc]
|