mirror of
https://github.com/carp-lang/Carp.git
synced 2024-10-11 04:27:55 +03:00
14 lines
380 B
Plaintext
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))
|
|
)
|