Block Comments in Clojure

后端 未结 9 1431
渐次进展
渐次进展 2021-01-31 01:13

How do I comment multiple lines in Clojure?

9条回答
  •  一生所求
    2021-01-31 01:36

    Other examples are great, I'd just like to add one more trick:

    Sometimes you want to comment out a few lines of code, but still have the compiler compile it and report any errors (e.g. a set of commands in a top-level namespace that you plan to execute later at the REPL).

    In this case I like to wrap the code with (fn [] .....) which means that it still gets compiled, it just doesn't get called.

提交回复
热议问题