On Tue, Feb 07, 2017 at 06:44:43AM -0800, Lindsay John Lawrence wrote:
> ((= '() Lst) '() )
> However when I (pp 'selectN) it wrote the line where I am trying to test
> ((= 'NIL Lst) 'NIL)
Yes, the reader returs the symbol NIL when it sees ()
> Is that correct? Shouldn't the pp output at least look something like
> this? (no ' on NIL)
> ((= NIL Lst) NIL)
'pp' just pretty-prints what is there. It does not modify the data in any way.
> It is a bit of nuance regarding '() , NIL and 'NIL I will have to keep
> in mind.
It is just that any symbol which evaluates to itself does not *need* to be
quoted. It does no harm to quote it, except for the penalty in terms of memory
This is e.g. NIL or T, but also strings (transient symbols).
Numbers, BTW, are also evaluating to themselves, so it is not necessary to write
e.g. (+ '3 '4) though it is not wrong.