sort tests added

This commit is contained in:
2021-02-26 09:49:54 +01:00
parent f7992b1eab
commit c104e3ce85
3 changed files with 23 additions and 11 deletions

View File

@@ -30,8 +30,8 @@
(+ n (scitej (- n 1)))
))
(print (scitej 4000))
; (print (scitej 5))
;; (print (scitej 4000))
(print (scitej 1000))
@@ -42,6 +42,10 @@
(print "sorted: " (quick-sort '(10 9 8 7 6 5 4 3 2 1)))
(print "sorted: " (quick-sort '(1 2 3 4 5 6 7 8 9 10)))
(print "sorted by: " (quick-sort-by '(10 9 8 7 6 5 4 3 2 1) (lambda (a b) (> a b)) ))
(print "sorted by: " (quick-sort-by '(1 2 3 4 5 6 7 8 9 10) (lambda (a b) (> a b)) ))
(print "sorted by: " (quick-sort-by '(1 2 3 4 5 6 7 8 9 10) (lambda (a b) (< a b)) ))