Skip to content

Instantly share code, notes, and snippets.

@AlejandroCatalina
Created November 13, 2015 10:31
Show Gist options
  • Save AlejandroCatalina/02b4d50f829ff9a822e7 to your computer and use it in GitHub Desktop.
Save AlejandroCatalina/02b4d50f829ff9a822e7 to your computer and use it in GitHub Desktop.
Elegant quicksort lisp version
(defun quicksort-compr (l)
(when l
(pattern (p . xs) l
(append (quicksort-compr (@ x x xs (< x p))) (list p)
(quicksort-compr (@ x x xs (>= x p)))))))
;; Using https://gist.github.com/AlejandroCatalina/7faaaee84cbda9884600
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment