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

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

Re: Why is result of `car' ⇒ quote ? [SOLVED]


From: Jean Louis
Subject: Re: Why is result of `car' ⇒ quote ? [SOLVED]
Date: Wed, 15 Jun 2022 00:53:15 +0300
User-agent: Mutt/+ () (2022-05-21)

* Emanuel Berg <incal@dataswamp.org> [2022-06-14 13:27]:
> >> Here I do not understand it quite, why do I get result of
> >> `car' below, to be `quote'?
> >>
> >> (nth 2 (car exporters)) ; ("Block 227, Plot 20086, Kakajja
> >> Zone") (car (nth 2 (car exporters))) ; quote
> >
> > And the answer is ...
> >
> > You have quoted the list twice!
> >
> > (setq exporters '((1 2 '("Block 227, Plot 20086, Kakajja Zone"))))
> >
> > (nth 2 (car exporters)) ; '("Block 227, Plot 20086, Kakajja Zone")
> >
> > (car (nth 2 (car exporters))) ; quote
> 
> Instead of quoting the list twice, use `list' three times
> 
>   (setq exporters (list (list 1 2 (list "Block 227, Plot 20086, Kakajja 
> Zone"))))
>   (nth 2 (car exporters))
>   (car (nth 2 (car exporters))) ; "Block 227, Plot 20086, Kakajja Zone"
> 
> and then it works :)

That is what I did now, thanks.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



reply via email to

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