mirror of
https://github.com/janet-lang/janet
synced 2024-11-25 01:37:19 +00:00
Update boot.janet
This commit is contained in:
parent
1f8c2781dd
commit
0e44ce5cba
@ -780,7 +780,7 @@
|
|||||||
(defn sort
|
(defn sort
|
||||||
``Sort `ind` in-place, and return it. Uses quick-sort and is not a stable sort.
|
``Sort `ind` in-place, and return it. Uses quick-sort and is not a stable sort.
|
||||||
|
|
||||||
If a `before?` comparator function is provided, sorts elements using that;
|
If a `before?` comparator function is provided, sorts elements using that,
|
||||||
otherwise uses `<`.``
|
otherwise uses `<`.``
|
||||||
[ind &opt before?]
|
[ind &opt before?]
|
||||||
(sort-help ind 0 (- (length ind) 1) (or before? <)))
|
(sort-help ind 0 (- (length ind) 1) (or before? <)))
|
||||||
@ -794,7 +794,7 @@
|
|||||||
(defn sorted
|
(defn sorted
|
||||||
``Returns a new sorted array without modifying the old one.
|
``Returns a new sorted array without modifying the old one.
|
||||||
|
|
||||||
If a `before?` comparator function is provided, sorts elements using that;
|
If a `before?` comparator function is provided, sorts elements using that,
|
||||||
otherwise uses `<`.``
|
otherwise uses `<`.``
|
||||||
[ind &opt before?]
|
[ind &opt before?]
|
||||||
(sort (array/slice ind) before?))
|
(sort (array/slice ind) before?))
|
||||||
|
Loading…
Reference in New Issue
Block a user