This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-06-23
Channels
- # announcements (3)
- # aws (1)
- # beginners (44)
- # biff (6)
- # calva (31)
- # cider (26)
- # clerk (12)
- # clj-kondo (9)
- # clojure (17)
- # clojure-dev (18)
- # clojure-europe (13)
- # clojure-norway (45)
- # clojure-uk (4)
- # clojurescript (34)
- # datomic (54)
- # dev-tooling (14)
- # emacs (19)
- # events (7)
- # honeysql (2)
- # hyperfiddle (51)
- # lsp (34)
- # malli (24)
- # matrix (1)
- # missionary (5)
- # off-topic (27)
- # re-frame (6)
- # reagent (18)
- # releases (2)
- # sci (6)
- # shadow-cljs (88)
- # vim (9)
Hi, I'm getting an invalid-arity warning when using rand-int
inside swap!
. I don't think there's anything wrong with my usage though.
What does the code look like?
(swap! rand rand-int 11)
It says rand-int expects two args?
I ended up switching to reset!
but this seems like an incorrect lint
rand-int
expected one argument so it cannot be used with swap!
(swap! my-atom f arg)
runs (f @my-atom arg)
essentially. So you're trying to call (rand-int @rand 11)
which is not valid.
I see. That makes sense. And yeah I screwed up that message. My bad.
Some days reading comprehension is not my long suit