summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-08-03 13:20:31 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-08-03 13:20:31 +0200
commitf5320e4d20a520bc5b9352f92efcb79b1cd2195b (patch)
tree836eea6c34fcca4b4c70d1aa2dc894fd6f5a8d36
parent5928a7413d946a589f4f476eb24452712409c7cd (diff)
Add LIST and LENGTH.
-rw-r--r--list-functions-2.lisp10
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))