-
Notifications
You must be signed in to change notification settings - Fork 179
Expand file tree
/
Copy pathSort.carp
More file actions
25 lines (20 loc) · 856 Bytes
/
Sort.carp
File metadata and controls
25 lines (20 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
(defmodule Array
(doc sort! "Perform an in-place heapsort of a given array.")
(defn sort! [arr]
(HeapSort.sort! arr))
(doc sorted "Perform a heapsort in a new copy of given array.")
(defn sorted [arr]
(HeapSort.sorted arr))
(doc sort "Perform an in-place heapsort of a given owned array.")
(defn sort [arr]
(HeapSort.sort arr))
(doc sort-by! "Perform an in-place heapsort of a given array by a comparison function.")
(defn sort-by! [arr f]
(HeapSort.sort-by! arr f))
(doc sorted-by "Perform a heapsort in a new copy of given array by a comparison function.")
(defn sorted-by [arr f]
(HeapSort.sorted-by arr f))
(doc sort-by "Perform an in-place heapsort of a given owned array by a comparison function.")
(defn sort-by [arr f]
(HeapSort.sort-by arr f))
)