Thanks for the help, everyone. You managed to pin down my problem. I was using "Clojure from the ground up" and a Scheme book, and the two together got me confused. So, I can say it like this:
Every expression is evaluated (meaning converted to a value), unless it is quoted. Every expression evaluates to itself, except symbols and lists. For example: keywords, numbers, strings, other container literals. A symbol evaluates to the value defined to it. A list evaluates to return value of the function. Actually, now that I think about it, I don't think that's right. '3 evaluates to 3, as can be seen in the expression (+ 2 '3) which evaluates to 5. If I try (+ 2 (+ 1 4)) it evaluates to 7, but (+ 2 '(+ 1 4)) generates a ClassCastException, PersistentList cannot be cast to Number. What this says to me is that the list, because it is quoted, evaluates to itself, like other literals. So I think it would be more accurate to say the following: Every expression evaluates to itself, except symbols and lists, unless they are quoted. Is that right? Also, I am still looking for a word that means "any value that is not a container." The Scheme book I'm using called these "atoms," but that clearly is incorrect in Clojure. The Clojure Glossary I cited before uses the term "scalar" but does not define it. The "Joy of Clojure" book uses "scalar" in the way I'm suggesting. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.