This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-05-11
Channels
- # aleph (3)
- # announcements (3)
- # aws (7)
- # babashka (121)
- # beginners (82)
- # calva (40)
- # chlorine-clover (37)
- # clj-kondo (68)
- # cljsrn (4)
- # clojure (43)
- # clojure-australia (1)
- # clojure-dev (6)
- # clojure-europe (15)
- # clojure-italy (2)
- # clojure-nl (1)
- # clojure-provo (3)
- # clojure-spec (23)
- # clojure-taiwan (1)
- # clojure-uk (21)
- # clojurescript (214)
- # code-reviews (1)
- # conjure (4)
- # core-async (10)
- # cursive (52)
- # datahike (5)
- # datascript (5)
- # datomic (62)
- # duct (1)
- # emacs (4)
- # fulcro (8)
- # graalvm (1)
- # helix (1)
- # honeysql (5)
- # integrant (1)
- # jackdaw (32)
- # jobs (3)
- # jobs-discuss (16)
- # juxt (1)
- # kaocha (3)
- # lsp (6)
- # malli (2)
- # meander (6)
- # nrepl (1)
- # off-topic (46)
- # other-languages (4)
- # pathom (7)
- # polylith (13)
- # re-frame (3)
- # releases (2)
- # shadow-cljs (56)
- # spacemacs (15)
- # tools-deps (3)
- # unrepl (1)
- # utah-clojurians (1)
(m/rewrite [:a :b :c :d]
;; something I don't know
;;
)
;; =>
;; [{:key1 :a :key2 :a :key3 :b} {:key1 :c key2 :c :key3 d}]
I'm curious, can you send the solution?
(m/rewrite [:a :b :c :d]
[?x ?y & ?more]
[{:k1 ?x :k2 ?x :k3 ?y} & (m/cata ?more)]
?x nil)
;; => [{:k1 :a, :k2 :a, :k3 :b} {:k1 :c, :k2 :c, :k3 :d}]
@U066U8JQJcool, thanks