Reputation: 2743
I use following code to get function name as symbol type
(:name (meta (var +)))
However, when I change to this,
((comp :name meta var) +)
CompilerException
is thrown
Upvotes: 2
Views: 664
Reputation: 4513
var
is one of Clojure's special forms. Special forms define a way in which its subexpressions are treated; they may define special syntax and evaluation rules for those subexpressions. Special forms (and var
operator in particular) are not functions and, in general, cannot be used in the manner functions are used.
Upvotes: 5