Page 1 of 1
Atoms Symbols etc
Posted: Sat Dec 10, 2005 1:44 am
by netytan
I was wondering if somone could tell me what an atom and what an Symbol is, they seem to be used intemitently and I just can't figure it out. I assumed that a Sybol was like a variable but an Atom I have no idea, is a Cons an Atom?
Thanks a lot guys :),
Mark.
Posted: Sat Dec 10, 2005 2:05 am
by Lutz
Code: Select all
> (map atom? '(a 1 1.2 (1 2 3) (x y z) (define (foo) ) (lambda (x)) "hello" nil true))
(true true true nil nil nil nil true true true)
>
lists (includes lambda expressions) are not atoms everything else is an atom. A 'cons' operation in newLISP always returns a list, there is no
dotted cons cell in newLISP. See also:
http://newlisp.org/index.cgi?page=Diffe ... ther_LISPs in paragraph 4.
Lutz
Posted: Sat Dec 10, 2005 1:51 pm
by netytan
Oh ok, so even symbols are atoms in Lisp? Lisp in general not just NewLisp
Thanks Lutz,
Mark.