(defreader id transform)
Defines and registers a "tagged literal" reader macro which will transform the tagged form.
Defines and registers a "tagged literal" reader macro which will transform the tagged form. * id - the name of the tag, e.g. p -> #p. * transform - a 2 argument function. This function is used at macro-expansion, so the usual macro rules apply. The first argument is the tagged form. The second argument is any metadata associated with the tagged form.
(defreader-n id transform)
Defines and registers a "nestable tagged literal" reader macro which will transform the tagged form and hide the effects of nested hashtag expansions.
Defines and registers a "nestable tagged literal" reader macro which will transform the tagged form and hide the effects of nested hashtag expansions. * id - the name of the tag, e.g. p -> #p. * transform - a 3 argument function. This function is used at macro-expansion, so the usual macro rules apply. The first argument is the form as seen by the compiler, including effects of nested hashtag expansions. The second is the "original" form, as it would be seen before expansion (and without any hashtags). Another way to think about it is that the first form is the one you want to execute, while the second is for display. The third argument is any metadata associated with the tagged form.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close