This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-27
Channels
- # beginners (54)
- # bitcoin (2)
- # boot (1)
- # calva (10)
- # cider (30)
- # cljs-dev (25)
- # cljsrn (17)
- # clojure (27)
- # clojure-dev (16)
- # clojure-estonia (3)
- # clojure-hk (1)
- # clojure-italy (8)
- # clojure-losangeles (1)
- # clojure-nl (17)
- # clojure-russia (1)
- # clojure-spec (15)
- # clojure-uk (45)
- # clojurebridge (1)
- # clojurescript (95)
- # clojurescript-ios (1)
- # core-async (5)
- # cursive (10)
- # datomic (8)
- # emacs (2)
- # figwheel-main (31)
- # fulcro (99)
- # hyperfiddle (3)
- # immutant (1)
- # jobs (13)
- # jobs-discuss (82)
- # keechma (6)
- # leiningen (3)
- # lumo (1)
- # nrepl (1)
- # off-topic (37)
- # onyx (1)
- # pedestal (6)
- # re-frame (7)
- # reitit (2)
- # remote-jobs (1)
- # ring-swagger (3)
- # rum (6)
- # shadow-cljs (14)
- # specter (4)
- # tools-deps (27)
- # yada (12)
So, asking a question here as a suggested place to do so. I have this stupid little hello word program:
(ns helloworld.core)
(defn foo
"I don't do a whole lot."
[x]
(println x "Hello, World!"))
(defn foobar
[x]
(+ x 3))
(foo (foobar 20))
It was kindly explained to me in #beginners that the repl is showing the side-effect
@dharrigan you should see the side effect printed in the Output pane Calva says. The inline evaluation shows the result of the evaluation, which is nil
in this case.
Hi @pez thank you for your reply. I see the output now - that's great! Very helpful and kind of you 🙂
That’s cool. BTW, my favorite evaluation command is to evaluate the toplevel form using ctrl+alt+v space
. So you can have the cursor anywhere in a form like defn
and get the function defined. Then place the cursor in code testing the function and use the same command. It will ignore outermost comment
forms so you can keep the testing code in the file if you like (I tend to do that both while developing functions and as documentation).