3 ms·
Yep, look at the implementation: (defmacro comment "Ignores body, yields nil" {:added "1.0"} [& body]) A macro that takes any number of argument
by fnordsensei 6y ago
Yep, look at the implementation:
(defmacro comment
"Ignores body, yields nil"
{:added "1.0"}
[& body])
A macro that takes any number of arguments and does absolutely nothing. This is still a macro invocation, so the arguments must not cause a reader error.
- eigenhombre 6y agoI sometimes teach macro writing basics at work, with exercises -- writing this macro is always Exercise One. It is a common pitfall to write non-readable content in a comment expression, which can certainly be confusing to newcomers who are used to less stringent multiline comments like /* ... */ or triple-quoted strings in Python.