Changeset 4640


Ignore:
Timestamp:
11/04/03 03:12:00 (18 years ago)
Author:
piso
Message:

LAMBDA is now implemented as a macro in boot.lisp.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/Primitives.java

    r4638 r4640  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Primitives.java,v 1.490 2003-11-04 01:42:26 piso Exp $
     5 * $Id: Primitives.java,v 1.491 2003-11-04 03:12:00 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    13441344    };
    13451345
    1346     // ### lambda
    1347     private static final SpecialOperator LAMBDA = new SpecialOperator("lambda")
    1348     {
    1349         public LispObject execute(LispObject args, Environment env)
    1350             throws ConditionThrowable
    1351         {
    1352             return new Closure(args.car(), args.cdr(), env);
    1353         }
    1354     };
    1355 
    13561346    // ### macro-function
    13571347    // Need to support optional second argument specifying environment.
    1358     private static final Primitive MACRO_FUNCTION =
    1359         new Primitive("macro-function") {
     1348    private static final Primitive MACRO_FUNCTION = new Primitive("macro-function")
     1349    {
    13601350        public LispObject execute(LispObject[] args) throws ConditionThrowable
    13611351        {
     
    13811371
    13821372    // ### defmacro
    1383     private static final SpecialOperator DEFMACRO =
    1384         new SpecialOperator("defmacro") {
     1373    private static final SpecialOperator DEFMACRO = new SpecialOperator("defmacro")
     1374    {
    13851375        public LispObject execute(LispObject args, Environment env)
    13861376            throws ConditionThrowable
     
    13901380            LispObject body = args.cddr();
    13911381            LispObject block = new Cons(Symbol.BLOCK, new Cons(symbol, body));
    1392             LispObject toBeApplied = list3(Symbol.LAMBDA, lambdaList, block);
     1382            LispObject toBeApplied =
     1383                list2(Symbol.FUNCTION, list3(Symbol.LAMBDA, lambdaList, block));
    13931384            LispObject formArg = gensym("FORM-");
    13941385            LispObject envArg = gensym("ENV-"); // Ignored.
Note: See TracChangeset for help on using the changeset viewer.