Clojure: is there a `fn` special character, macro, or special form?

Doc says this is a special form, although I can see that it is defined as a macro.

Also (meta #'fn)has both :macroand :special-formtrue.

Finally, (special-symbol? 'fn)there is false, although (special-symbol? 'fn*)there is true.

Can someone clarify this for me? Are there any other weird characters in Clojure that are both special forms and macros and not a special character?

And one more thing: this is the only character being called that I have seen so far that has this (meta #'fn):

{:arglists ([& sigs]),
 :forms [(fn name? [params*] exprs*) 
         (fn name? ([params*] exprs*) +)]...}

Thus, the arg list is not in :arglists, like other characters, but in :forms. Any other characters like this in Clojure?

+4
1

let let*
letfn letfn*
loop loop*

- , . var Clojure. , , , , .. Clojure.

Clojure documentation ", Clojure, ". , , , .

. , , , , . , and , . Clojure and , .

+5

Source: https://habr.com/ru/post/1524830/


All Articles