This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-08-11
Channels
- # announcements (2)
- # beginners (30)
- # biff (6)
- # calva (4)
- # cider (4)
- # clj-yaml (3)
- # clojure (14)
- # clojure-europe (43)
- # clojure-nl (8)
- # clojure-norway (34)
- # clojure-uk (2)
- # clojurescript (11)
- # clr (2)
- # conjure (3)
- # cursive (1)
- # datomic (18)
- # helix (1)
- # humbleui (6)
- # hyperfiddle (110)
- # java (25)
- # kaocha (2)
- # lsp (29)
- # missionary (7)
- # off-topic (9)
- # pathom (106)
- # polylith (27)
- # rdf (12)
- # re-frame (9)
- # releases (4)
- # spacemacs (2)
- # tools-build (4)
- # tools-deps (6)
I am a noob and going through the calva training and feel like this part of the training didn't evaluate correctly. Should both comments evaluate to nil?
it’s evaluating the whole form.
user=> (source comment)
(defmacro comment
"Ignores body, yields nil"
{:added "1.0"}
[& body])
and the comment
macro expands to nothing. It’s purpose is to be a wrapper around a bunch of forms that won’t evaluate when you require or load a file. But you can evaluate subforms in them. So (println (greet "World"))
will evaluate to what you expect. But evaluating the whole (comment (println (greet "World")))
won’t do anything (by design)