This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-28
Channels
- # babashka (10)
- # beginners (140)
- # cider (6)
- # clj-kondo (10)
- # cljs-dev (39)
- # cljsrn (6)
- # clojars (1)
- # clojure (23)
- # clojure-europe (2)
- # clojure-spec (7)
- # clojure-uk (6)
- # clojurescript (1)
- # conjure (16)
- # cursive (3)
- # datomic (3)
- # emacs (6)
- # fulcro (13)
- # graalvm (3)
- # malli (8)
- # meander (4)
- # off-topic (43)
- # pathom (1)
- # pedestal (15)
- # re-frame (13)
- # reagent (3)
- # sci (25)
- # shadow-cljs (26)
- # sql (9)
- # testing (34)
- # tools-deps (80)
@neural.works.com
I'm confused by the question. By "very first value of my ratom"
• I assume you mean the ratom c
in doit
• if so, do you mean you want the value in c
before the swap!
in btn
?
@mikethompson Hi Mike sorry about the confusion!! you are right how i get the value o 'c' before the swap! ?
@neural.works.com You can't. Once the swap happens it's swapped. The old value isn't retained. You need to store it elsewhere and not update it. Something like
(let [init 0
c (r/atom init)]