Changeset 11688


Ignore:
Timestamp:
02/28/09 11:05:08 (12 years ago)
Author:
ehuelsmann
Message:

Add list() with variadic arguments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/Lisp.java

    r11672 r11688  
    590590    else
    591591      env.bind(sym, value);
     592  }
     593
     594  public static final Cons list(LispObject... objects)
     595  {
     596    Cons theList = new Cons(objects[objects.length-1]);
     597    for (int i = objects.length - 2; i >= 0; i--)
     598        theList = new Cons(objects[i], theList);
     599    return theList;
    592600  }
    593601
Note: See TracChangeset for help on using the changeset viewer.