You're viewing version 1.2.0 of quote. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16



1 Example top

  • ;; ' is the shortcut for quote
    user> (= 'a (quote a))
    ;; quoting keeps something from being evaluated
    user> (quote (println "foo"))
    (println "foo")
    => *clojure-version*
    {:major 1, :minor 5, :incremental 0, :qualifier "RC17"}
    => (quote)
    => (quote 1)
    => (quote 1 2 3 4 5)
    => quote
    CompilerException java.lang.RuntimeException: Unable to resolve symbol: quote in this context, compiling:(NO_SOURCE_PATH:1:42)
Log in to add / edit an example.

See Also top

Log in to add a see also.

Comments top

1 comment(s) for quote.

Quote gives you the unevaluated form. That is:

user=> '(foo bar baz)

Will not attempt to evaluate foo as a function but rather just return the data structure as is (with the three symbols unevaluated).

Log in to add a comment.