In Clojure (and other Lisps) 'is a shortcut to the form (quote ...). Therefore, when Clojure sees this:
('A 'B 'C)
which is "translated" by the reader into:
((quote A) (quote B) (quote C))
Each of these forms of quotes evaluates to a character, therefore (quote A)evaluates a character named A. In Clojure, characters are functions and can be used, therefore it ((quote A) (quote B) (quote C))is actually a function call. From the docs:
", , IFn invoke() () ( ). ('mysym my-hash-map: none) as ( my-hash-map 'mysym: none).
, C .
,
'('A 'B 'C)
(quote ((quote A) (quote B) (quote C)))
, , quote ( A, B, C).
, (last '('A 'B 'C)) (quote C). , , C C, (quote C) - .
:
user=> (class ('A 'B 'C))
clojure.lang.Symbol
user=> (class (last '('A 'B 'C)))
clojure.lang.PersistentList
user=>
, !