Length

[email protected]
Newsgroups gmane.lisp.allegro
Message-ID <[email protected]>
> Hello,
> Why is the length of (quote '(1 2 3)) 2 not 3?
> For example:
> CG-USER(3): (length (quote '(1 2 3)))
> 2

It has nothing to do with LENGTH.

The argument provided to LENGTH in your example is the value of the
expression (QUOTE '(1 2 3)).

Its value is '(1 2 3).

'(1 2 3) is an abbreviation for (QUOTE (1 2 3)),
which is a TWO-element list consisting of the symbol QUOTE
and the three-element list (1 2 3).

 -Bob
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.