Carp/core/Sort.carp
2018-06-26 18:03:34 +10:00

14 lines
380 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))
)