Skip to content

Instantly share code, notes, and snippets.

@mfikes
Last active May 1, 2016 14:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfikes/23ec47a415371ad15fe67f0ebb8c911b to your computer and use it in GitHub Desktop.
Save mfikes/23ec47a415371ad15fe67f0ebb8c911b to your computer and use it in GitHub Desktop.
Specter in Planck

Specter has been updated for bootstrap ClojureScript and can be used with Planck. Here's how:

First, make a Project file

(defproject sp "0.1.0"
  :dependencies [[com.rpl/specter "0.10.0"]])

Now you can try Specter constructs in bootstrap ClojureScript!

$ planck -qc `lein classpath`
Retrieving com/rpl/specter/0.10.0/specter-0.10.0.pom from clojars
Retrieving com/rpl/specter/0.10.0/specter-0.10.0.jar from clojars
cljs.user=> (require '[com.rpl.specter :refer [transform ALL]])
nil
cljs.user=> (transform [ALL :a even?]
              inc
              [{:a 1} {:a 2} {:a 4} {:a 3}])
[{:a 1} {:a 3} {:a 5} {:a 3}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment