All pastes #910023 Raw Edit

Unnamed

public text v1 · immutable
·published 2008-02-19 18:16 UTC
rendered paste body
(defun quicksort_r(lst)
  (if (endp lst)
      lst
    (let ((pivot (first lst)) (left '()) (right '()))
      (mapcar (lambda (x) (if (<= x pivot)
			    (setf left (append left (list x)))
			    (setf right (append right (list x)))))
	      (rest lst))
      (append (quicksort_r left) (list pivot) (quicksort_r right))))))