Saturday, October 8, 2016

TIL: multiline comments

It is possible to form a multiline comment, with the comment function:


(comment

; won't be executed 
;      V
(defn somefunc ; ...
;...

)

There is a caveat, though: code inside the comment must be valid Clojure code!


Update: there is a way to work around the above issue: put the commented out stuff in quotes

(comment "

; won't be executed 
;      V
(defn somefunc ; ...
;...

")

No comments:

Post a Comment