On Sat, Jan 8, 2011 at 6:49 PM, Andreas Kostler <andreas.koestler.le...@gmail.com> wrote: > Hello again, > How do I test for a literal? There are predicates for symbols and > keywoards etc: > symbol?, keyword? > Is there an equivalent for literals...like literal?
Not at runtime. At macroexpansion time you can use list? and that's *almost* correct -- literal strings, numbers, vectors, and such will give false (though, for instance, a literal vector may contain expressions and other nonliteral contents) and s-expression will give true. On the other hand, '(1 2 3) will give true as well (but quoted literal lists are uncommon in Clojure). -- 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