help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Why doesn't nconc change my variable?


From: Marcin Borkowski
Subject: Re: Why doesn't nconc change my variable?
Date: Sun, 05 Oct 2014 11:35:35 +0200

On 2014-10-05, at 03:59, Pascal J. Bourguignon wrote:

> Marcin Borkowski <mbork@wmi.amu.edu.pl> writes:
>
>> Hi list,
>>
>> I don't get it.
>
> () is actually read as the symbol nil.
> Symbols are symbols, and not cons cells.  
> You cannot transform a symbol into a cons cell.
> It is impossible for any function to transform nil into a cons cell.
>
> And vice-versa, it is impossible to transform a cons cell into a symbol
> such as nil.  This is the reason why you should also use setf when
> deleting elements from a list:
>
>    (setf list (delete e list))

I still don't understand.  What if I used (list) to generate an empty
list instead of () or nil?  The results seem to be still the same.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



reply via email to

[Prev in Thread] Current Thread [Next in Thread]