From: ··············@my-deja.com
Subject: Comparing list element with 'sant
Date: 
Message-ID: <94qdkn$e0m$1@nnrp1.deja.com>
I really need some help with a simple problem, I have tried to do the
following :

(if (eq (last lista) 'sant)
    t
   nil)

where lista is ( variable . sant ) or (  variable . falskt ), with no
success.

Please show me how to do this, and I'll be very grateful!

/Anders


Sent via Deja.com
http://www.deja.com/
From: Hartmann Schaffer
Subject: Re: Comparing list element with 'sant
Date: 
Message-ID: <slrn971asj.3qb.hs@paradise.nirvananet>
In article <············@nnrp1.deja.com>, ··············@my-deja.com wrote:
>I really need some help with a simple problem, I have tried to do the
>following :
>
>(if (eq (last lista) 'sant)
>    t
>   nil)
>
>where lista is ( variable . sant ) or (  variable . falskt ), with no
>success.
>
>Please show me how to do this, and I'll be very grateful!

just in case this is home work: check out the definition of last or at least
fire up your list interpreter and type in (last '(a b c .d)).  you will see
that you shouldn't expect the result you expect

hs