Make a project.clj
file that can manage the dep:
(defproject foo "0.1.0-SNAPSHOT"
:dependencies [[andare "0.1.0"]])
Start Planck:
planck -Kc `lein classpath`
Then, use it:
cljs.user=> (require-macros '[cljs.core.async.macros :refer [go]])
nil
cljs.user=> (require '[cljs.core.async :refer [chan >! <!]])
nil
cljs.user=> (def c (chan))
#'cljs.user/c
cljs.user=> (go (prn (<! c)))
#object[cljs.core.async.impl.channels.ManyToManyChannel]
cljs.user=> (go (prn (>! c :a)))
#object[cljs.core.async.impl.channels.ManyToManyChannel]
true
:a
A few further notes:
- The
-K
option will cause the compiled code to be cached, which starts to become noticable for a library the size ofcore.async
. So, subsequent launches will be faster. - If you'd like the
lein
dep managment to be even faster as well see "Caching Classpath" here. - While things work fine with the shipping version of Planck, master has better REPL support for the asyncronous printing you are likely to encounter when playing with
core.async
. You can easily install master viabrew
: See the "Install Master" section here.