Help on setf behavior
Posted: Sat Dec 01, 2012 10:50 am
HI
I do not understand why this expr :
return 2 it’s ok, but now if we call lst return is : (1 2)-…??
Instead I’ll expect ( 2 1)…
can somebody
illuminate me?? thanks in advance
I do not understand why this expr :
Code: Select all
(setf lst nil)
(setf (car lst)(1+ (car (push 1 lst))))
2
lst
(1 2)
return 2 it’s ok, but now if we call lst return is : (1 2)-…??
Instead I’ll expect ( 2 1)…
can somebody
illuminate me?? thanks in advance