Skip to content

Instantly share code, notes, and snippets.

/gist:268924
Created Jan 4, 2010

Embed
What would you like to do?
(defn qsort[col]
(if (seq col)
(let [x (first col) c (rest col)
y (qsort (filter #(< % x) c) )
z (qsort (filter #(>= % x) c) ) ]
(lazy-cat y (cons x z )))
col ))
(qsort [ 234 2 3 1 2 3 34 ])
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.