Skip to content

Instantly share code, notes, and snippets.

/gist:268915
Created Jan 4, 2010

Embed
What would you like to do?
(defn qsort[col]
(if (seq col)
(let [x (first col) c (rest col)]
((let [y (qsort (filter #(< x %) c) )
z (qsort (filter #(>= x %) c) ) ]
(lazy-cat y (cons x z )))
)) col))
(qsort [ 1 2 3 ])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.