initial support for nil, make-list

unfinished, but usable.. still 0 is false in libs and code
This commit is contained in:
2021-03-01 18:26:58 +01:00
parent 46b29fc229
commit 8586a66285
6 changed files with 55 additions and 13 deletions

View File

@@ -69,6 +69,19 @@
0)
))
(defun make-list-of (size val)
(do
(define lst '())
(define i 0)
(while (< i size)
(define lst (push lst val))
(define i (inc i)))
lst
))
(defun make-list (size)
(make-list-of size nil))
; quicksort
(defun quick-sort-by (l cmp)