mirror of
https://github.com/carp-lang/Carp.git
synced 2024-11-05 04:44:12 +03:00
26 lines
856 B
Plaintext
26 lines
856 B
Plaintext
(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))
|
|
)
|