newLISP Fan Club

Forum => Anything else we might add? => Topic started by: netytan on December 09, 2005, 05:44:35 PM

Title: Atoms Symbols etc
Post by: netytan on December 09, 2005, 05:44:35 PM
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.
Title:
Post by: Lutz on December 09, 2005, 06:05:15 PM

> (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=Differences_to_Other_LISPs in paragraph 4.



Lutz
Title:
Post by: netytan on December 10, 2005, 05:51:38 AM
Oh ok, so even symbols are atoms in Lisp? Lisp in general not just NewLisp



Thanks Lutz,



Mark.