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

Order of evaluation in PUSH



    Date: Wed, 20 May 87 13:57:56 -0700
    From: labrea!peck@Sun.COM

     In the form: (push (ref1) (car (ref2)))
    It is unclear whether (ref1) should be evaluated before (ref2). 
    ....

    Lucid and Franz evaluate (ref2) then (ref1)
    Symbolics evaluate (ref1) then (ref2)

KCL falls in the former group:

(macroexpand '(push (ref1) (car (ref2))))   =>

(LET* ((#:G7 (REF2)) (#:G8 (CONS (REF1) (CAR #:G7))))
  (PROGN (RPLACA #:G7 #:G8) #:G8))