[armedbear-cvs] r11688 - trunk/abcl/src/org/armedbear/lisp

Erik Huelsmann ehuelsmann at common-lisp.net
Sat Feb 28 11:05:13 UTC 2009


Author: ehuelsmann
Date: Sat Feb 28 11:05:08 2009
New Revision: 11688

Log:
Add list() with variadic arguments.

Modified:
   trunk/abcl/src/org/armedbear/lisp/Lisp.java

Modified: trunk/abcl/src/org/armedbear/lisp/Lisp.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Lisp.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Lisp.java	Sat Feb 28 11:05:08 2009
@@ -591,6 +591,14 @@
       env.bind(sym, value);
   }
 
+  public static final Cons list(LispObject... objects)
+  {
+    Cons theList = new Cons(objects[objects.length-1]);
+    for (int i = objects.length - 2; i >= 0; i--)
+        theList = new Cons(objects[i], theList);
+    return theList;
+  }
+
   public static final Cons list1(LispObject obj1)
   {
     return new Cons(obj1);




More information about the armedbear-cvs mailing list