moved lispy from 02 to 18

This commit is contained in:
Luciano Ramalho
2021-09-15 22:48:08 -03:00
parent 00e4741926
commit 6527037ae7
38 changed files with 590 additions and 1219 deletions

View File

@@ -0,0 +1,17 @@
(define (quicksort lst)
(if (null? lst)
lst
(begin
(define pivot (car lst))
(define rest (cdr lst))
(append
(quicksort
(filter (lambda (x) (< x pivot)) rest))
(list pivot)
(quicksort
(filter (lambda (x) (>= x pivot)) rest)))
)
)
)
(display
(quicksort (list 2 1 6 3 4 0 8 9 7 5)))