"double symbol"

Q&A's, tips, howto's
Locked
denis
Posts: 20
Joined: Wed Apr 27, 2011 12:19 pm
Location: Petsamo, Murmansk, RU

"double symbol"

Post by denis »

Hi! Maybe a simple question, but why double symbol is not detected as symbol?

Code: Select all

(symbol? ''a) ; -> nil
; but
(symbol? (eval ''a)) ; -> true
What type of object is ''a (or e.g. '''''''''''''''''''''a) then?

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Re: "double symbol"

Post by cormullion »

Probably a quoted expression.

Code: Select all

> (quote? ''a)
true
> (quote? 'a)
nil
Don't know for sure, though.

denis
Posts: 20
Joined: Wed Apr 27, 2011 12:19 pm
Location: Petsamo, Murmansk, RU

Re: "double symbol"

Post by denis »

Oh, true. Thanks, cormullion!
Needed this to analyze what macroses get in the (args). Complex cases happen when macro calls another macro. Maybe I go in wrong way, but for the moment current the question how to detect the form (type) of argument is relevant :-)

Locked