[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

just a question



    Date: Thu, 3 Dec 87 11:05:13 -0200
    From: Moshe Cohen <moco@wisdom.bitnet>

    Why is it not possible to set an array element to the result of
    the COMPILE function as in:

     (SETF (AREF ARRAY-NAME 1) (COMPILE NIL #'(LAMBDA () 'F)))  .

This form is in error, I believe:
Shouldn't it be:
(SETF (AREF ARRAY-NAME 1) (COMPILE NIL '(LAMBDA () 'F)))?

    The following error message is received:

       Trap: The argument given to the CAR instruction,
	#<LEXICAL-CLOSURE (LAMBDA NIL #) 40303466>,
       was not a locative, a list, or NIL.


    It IS possible to do it with an auxiliary variable to hold the
    result or by using what I understand as a NOOP:

     (SETF (AREF ARRAY-NAME 1) (EVAL '(COMPILE NIL #'(LAMBDA () 'F))))


    Moshe Cohen.