This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-19
Channels
- # announcements (37)
- # aws (6)
- # babashka (12)
- # babashka-sci-dev (16)
- # beginners (83)
- # biff (10)
- # cider (14)
- # cljdoc (26)
- # cljs-dev (20)
- # clojure (123)
- # clojure-czech (9)
- # clojure-europe (26)
- # clojure-nl (4)
- # clojure-norway (20)
- # clojure-spec (7)
- # clojure-uk (6)
- # clojured (14)
- # clojurescript (28)
- # cursive (5)
- # datalevin (8)
- # datomic (3)
- # duct (6)
- # emacs (26)
- # events (2)
- # fulcro (7)
- # gratitude (1)
- # holy-lambda (19)
- # integrant (1)
- # jobs (2)
- # leiningen (8)
- # lsp (7)
- # nyc (1)
- # pathom (70)
- # re-frame (8)
- # reagent (15)
- # releases (1)
- # sci (8)
- # shadow-cljs (117)
- # testing (5)
- # tools-deps (11)
- # vim (5)
there isn't some "pro" way to pass variable args to the L2/L3 syntactic sugar, is there? eg
(reg-sub :foo
:<- [:sub-with-arg %]
:<- [:sub-with-two-args %1 %2]
(fn [[a b] _) ,,,))
I guess JS arity being JS arity I would not be all that surprised if re-frame re-wrote things so that internally this worked:
(reg-sub :foo
:<- [:sub-with-arg] ;; implicit first-arg, sub ignores second anyway
:<- [:sub-with-two] ;; implicit first-arg second-arg
(fn [[a b] [_ _first-arg _second-arg]] ,,,))
could be a bit of a head scratcher but at least things "documented" (BIG air quotes) in the 2nd arg of the second function