Contents    Prev    Next    Page+10    Index   

Quotation

Since we will be working with symbols, we must be able to distinguish between use of a symbol as a name that denotes a value (its binding) and a reference to the symbol itself.

A single-quote symbol ' is used to denote the symbol itself; this is a read macro that expands to a pseudo-function quote.


>(def car 'ford)  ; > denotes input to Clojure

>car
ford

>'car
car

>(quote car)
car

>(eval (quote car))
ford