Thanks!
I still trip over those nuances if I don't pay attention.... testing for
NIL or '(), or not, in lists and symbols.
/Lindsay

On Mon, Feb 6, 2017 at 11:13 PM, Alexander Burger <a...@software-lab.de>
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:picolisp@software-lab.de?subject=Unsubscribe
>

Reply via email to