Carp/core/Sort.carp

14 lines
380 B
Plaintext
Raw Normal View History

2018-06-26 11:03:34 +03:00
(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))
)