Could someone please explain why this works...
(setq a-list (quote (1 2 3 4 5)))
and this doesn't...
(setq a-list ( '(1 2 3 4 5)))
I am confused as QUOTE is supposed to be equivalent to ', but it doesn't
seem to be in this particular case.
-Luke
"Luke J Crook" <······@socal.rr.com> writes:
> Could someone please explain why this works...
>
> (setq a-list (quote (1 2 3 4 5)))
>
> and this doesn't...
>
> (setq a-list ( '(1 2 3 4 5)))
>
> I am confused as QUOTE is supposed to be equivalent to ', but it doesn't
> seem to be in this particular case.
>
> -Luke
'FORM is an abbreviation for (QUOTE FORM), so there are too many
parentheses in your example. Should be
(setq a-list '(1 2 3 4 5))
HTH,
Edi.
Thank you for the near instantaneous reply. I now understand the difference.
(setq var-1 (QUOTE a))
is equivalent to...
(setq var-1 'a)
-Luke
"Dr. Edmund Weitz" <···@agharta.de> wrote in message
···················@bird.agharta.de...
> "Luke J Crook" <······@socal.rr.com> writes:
>
> > Could someone please explain why this works...
> >
> > (setq a-list (quote (1 2 3 4 5)))
> >
> > and this doesn't...
> >
> > (setq a-list ( '(1 2 3 4 5)))
> >
> > I am confused as QUOTE is supposed to be equivalent to ', but it doesn't
> > seem to be in this particular case.
> >
> > -Luke
>
> 'FORM is an abbreviation for (QUOTE FORM), so there are too many
> parentheses in your example. Should be
>
> (setq a-list '(1 2 3 4 5))
>
> HTH,
> Edi.