tags:

views:

828

answers:

3

How do I comment multiple lines in Clojure?

+4  A: 

Clojure supports a #_ reader macro which completely skips the next form. This is mentioned on the page about the Clojure Reader. There is also the comment macro which has a similar effect, but is implemented differently.

Both the above require that the thing that you're commenting out is otherwise a syntactically correct S-expression.

Some Lisp dialects have a multi-line comment that can contain arbitrary text, but I don't see one for Clojure.

Greg Hewgill
+4  A: 
Rayne
I thought id miss my #||# but this is way better.
kunjaan
I hope you're having fun with Clojure. :)
Rayne
+3  A: 

See this link: http://en.wikibooks.org/wiki/Clojure_Programming/Tutorials_and_Tips

You can create multiline comments with the syntax

(comment .....
    ....)
chollida
Thanks. The link was great.
kunjaan