This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-13
Channels
- # announcements (1)
- # asami (6)
- # babashka (7)
- # beginners (94)
- # biff (1)
- # calva (18)
- # clj-kondo (35)
- # cljsrn (1)
- # clojure (7)
- # clojure-europe (1)
- # clojure-nl (1)
- # clojure-uk (1)
- # clojurescript (18)
- # core-logic (1)
- # datalog (2)
- # editors (10)
- # exercism (2)
- # figwheel-main (1)
- # fulcro (2)
- # introduce-yourself (1)
- # lsp (33)
- # malli (7)
- # off-topic (3)
- # pedestal (1)
- # portal (2)
- # re-frame (16)
- # releases (1)
- # shadow-cljs (10)
- # specter (3)
- # tools-deps (8)
OK, here we go! specter in #babashka, all specter's tests are passing! Install the latest dev preview:
bash <(curl ) --version 0.7.8-SNAPSHOT --dir .
Then try this script:
(require '[babashka.deps :as deps])
(deps/add-deps '{:deps {com.rpl/specter {:git/url ""
:git/sha "8ba809a2cd35d3b6f8c5287e6bd3b4e06e42f6dc"}}})
(require '[com.rpl.specter :as s])
(s/transform [(s/walker number?) odd?] inc {:a 1 :b [1 2 3]})
with:
./bb specter.clj
and it should print:
{:a 2, :b [2 2 4]}
@nathanmarz I'd love to contribute this back upstream, if you are open to this. The diff is fairly small: the JVM and CLJS code paths are unchanged, there are only a few extra :bb
reader conditionals introduced.
The diff: https://github.com/borkdude/specter/commit/8ba809a2cd35d3b6f8c5287e6bd3b4e06e42f6dc