diff options
-rw-r--r-- | list-functions-2.lisp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/list-functions-2.lisp b/list-functions-2.lisp index 6121f71..c32d46e 100644 --- a/list-functions-2.lisp +++ b/list-functions-2.lisp @@ -122,3 +122,13 @@ (defun acons (indicator value alist) (cons (cons indicator value) alist)) + +(defun list (&rest objects) + (if objects + (sys::cons (sys::car objects) (sys::cdr objects)) + nil)) + +(defun length (list) + (if list + (%1+ (length (cdr list))) + 0)) |