initial support for nil, make-list
unfinished, but usable.. still 0 is false in libs and code
This commit is contained in:
@@ -14,6 +14,9 @@
|
||||
(print "(member '(1 2 3) 3:" (member '(1 2 3) 3))
|
||||
(print "(member '(1 2 3) 30:" (member '(1 2 3) 30))
|
||||
|
||||
(print "(make-list 3) :" (make-list 3))
|
||||
(print "(make-list-of 3) :" (make-list-of 3 999))
|
||||
|
||||
|
||||
(defun fact (n)
|
||||
(if (<= n 1)
|
||||
@@ -45,7 +48,7 @@
|
||||
(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)) ))
|
||||
(print "sorted by desc: " (quick-sort-by '(1 2 3 4 5 6 7 8 9 10) (lambda (a b) (< a b)) ))
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user