From f5320e4d20a520bc5b9352f92efcb79b1cd2195b Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 3 Aug 2008 13:20:31 +0200 Subject: Add LIST and LENGTH. --- list-functions-2.lisp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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)) -- cgit v1.2.3