This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-16
Channels
- # announcements (2)
- # beginners (50)
- # boot (80)
- # calva (4)
- # cider (58)
- # cljs-dev (11)
- # clojure (140)
- # clojure-brasil (1)
- # clojure-denver (1)
- # clojure-dev (10)
- # clojure-europe (8)
- # clojure-finland (2)
- # clojure-italy (5)
- # clojure-nl (2)
- # clojure-quebec (1)
- # clojure-spec (2)
- # clojure-sweden (4)
- # clojure-uk (94)
- # clojurescript (98)
- # cursive (19)
- # data-science (1)
- # datascript (9)
- # datomic (43)
- # emacs (2)
- # fulcro (29)
- # graphql (41)
- # hoplon (15)
- # jobs (2)
- # kaocha (4)
- # liberator (24)
- # off-topic (9)
- # perun (1)
- # re-frame (11)
- # reagent (17)
- # reitit (8)
- # remote-jobs (2)
- # rum (2)
- # shadow-cljs (24)
- # spacemacs (1)
- # specter (1)
- # tools-deps (21)
… while this is working:
`{1 ~@[2 3] 4 ~@[5 6]}
=> {1 2, 3 4, 5 6}
user=> '`{1 ~@[2 3] 4}
Syntax error reading source at (REPL:1:16).
Map literal must contain an even number of forms
user=> '`{1 ~@[2 3] 4 ~@[5 6]}
(clojure.core/apply clojure.core/hash-map (clojure.core/seq (clojure.core/concat (clojure.core/list 1) [2 3] (clojure.core/list 4) [5 6])))
user=>
the first has an odd # of items in the map literal; the second has an even #. it fails in the reader
The problem prevents legitimate macro expansion via the unquote-splicing within maps, like this one:
{:a :b, ~@my-pair}
I should say that it prevents convenience for normal usage - my first example shown uneven placement of the pairs.