Macros and Functions in Clojure

I read the next line in this Clojure tutorial - http://java.ociweb.com/mark/clojure/article.html#Macros

'Because macros do not evaluate their arguments, they can be passed names without quotes, and you can create function calls with arguments. Function definitions cannot do this, and instead anonymous functions must be passed that complete the function calls. ''

If this is correct, then why does it work, since the function cube is not anonymous -

(defn something [fn x]
  (fn x))

(defn cube [x]
  (* x x x))

(something cube 4)
+4
source share
2 answers

, . , , -, :

(some-function (bla 1 2 3))

(bla 1 2 3) , .

(some-macro (bla 1 2 3))

(bla 1 2 3), - .

, , , , .

+4

defn - s, , : (def something (fn [fn x] (fn x))). , .

-1

All Articles