Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
(defn qsort-simple
"Quicksort - the simple algorithm"
[[pivot & tail :as coll]]
(if (> 2 (count coll))
coll
(let [less (filter (partial >= pivot) tail)
more (filter (partial < pivot) tail)]
(concat (qsort-simple less) [pivot] (qsort-simple more)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.