Re: Length again and definition of macro

Matthew Danish <[email protected]>
Newsgroups gmane.lisp.allegro
Message-ID <[email protected]>
You are confusing yourself.  I recommend that you cease using ' and use
only its explicitly expanded form (quote ...) until you understand the
issues.  Also I recommend that you ensure that you understand what it
means to have strict evaluation of function arguments.

As an example:

(quote '(1 2 3)) is read as (quote (quote (1 2 3)))

(quote (quote (1 2 3))) evaluates to the list (quote (1 2 3))

therefore

(length (quote (quote (1 2 3)))) evaluates to (length v)
					where v = the list (quote (1 2 3))

Then you apply the function length to its evaluated argument, and
here the argument is a list of length 2 quite clearly: QUOTE is the
first element and (1 2 3) is the second element.

-- 
; Matthew Danish <[email protected]>
; OpenPGP public key: C24B6010 on keyring.debian.org
; Signed or encrypted mail welcome.
; "There is no dark side of the moon really; matter of fact, it's all dark."
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.