I just noticed... my original source for the selectN function is this... (de selectN (Lst P) .. ((= '() Lst) '() ) ..
However when I (pp 'selectN) it wrote the line where I am trying to test for an empty list as (de selectN (Lst P) .. ((= 'NIL Lst) 'NIL) .. Is that correct? Shouldn't the pp output at least look something like this? (no ' on NIL) .. ((= NIL Lst) NIL) .. It is a bit of nuance regarding '() , NIL and 'NIL I will have to keep in mind. /Lindsay On Mon, Feb 6, 2017 at 11:13 PM, Alexander Burger <[email protected]> wrote: > On Tue, Feb 07, 2017 at 07:41:45AM +0100, Alexander Burger wrote: > > (cond > > ((= 'NIL Lst) 'NIL) > > One important note: (= 'NIL Lst) is not a good idea. > Better to use (not Lst). > > (= NIL Lst) would compare *names* if 'Lst' happened to be > a symbol, so (= NIL "NIL") returns T. > > Better is (== NIL Lst), which checks for identity. > > Anyway, good that we have have 'not' ;) > > ♪♫ Alex > -- > UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe >
