Tag Archives: sort

While we are at it

(define qs (lambda (t) (if (null? t) t (let ((head (car t)) (tail (cdr t))) (append (qs (filter (lambda (x) (<= x head)) tail)) (list head) (qs (filter (lambda (x) (> x head)) tail))))))) A non optimized quick-sort in the same vein. Good for toying with Bigloo’s trace system. (define insert (lambda (elem t) (if [...]