Category talk:Wren-sort: Difference between revisions
Content added Content deleted
(→Source code: Added Find.quick method plus a few other minor changes.) |
(→Source code: Removed type aliases which are not longer needed.) |
||
Line 2: | Line 2: | ||
<lang ecmascript>/* Module "sort.wren" */ |
<lang ecmascript>/* Module "sort.wren" */ |
||
import "/trait" for Comparable |
import "./trait" for Comparable |
||
/* |
/* |
||
Line 482: | Line 482: | ||
return (c%2 == 1) ? [[a[hc]], 1, hc..hc] : [[a[hc-1], a[hc]], 2, hc-1..hc] |
return (c%2 == 1) ? [[a[hc]], 1, hc..hc] : [[a[hc-1], a[hc]], 2, hc-1..hc] |
||
} |
} |
||
}</lang> |
|||
} |
|||
// Type aliases for classes in case of any name clashes with other modules. |
|||
var Cmp_Cmp = Cmp |
|||
var Cmp_Sort = Sort |
|||
var Cmp_Find = Find |
|||
var Cmp_Comparable = Comparable // in case imported indirectly</lang> |