On Friday, November 25, 2016 at 10:27:19 AM UTC-6, Tommi Reiman wrote:
> Hi,
> 
> Bumped into the same while writing spec-tools macros for both clj & cljs. You 
> can ask from &env which code it's emitting. There is a good example in 
> Datascript.
> 
> https://github.com/tonsky/datascript/blob/master/src/datascript/arrays.cljc
> 
> hope this helps,
> 
> Tommi

Thanks Tommi--very nice.  If I understand the test that's used in the macros 
there, i.e.

    (defn- if-cljs [env then else]
      (if (:ns env) then else))    ,

then the idea is that 'ns' is a name that's defined when Clojure is being used 
for the Clojurescript pre-processing step, but not for normal Clojure 
compilation?

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/clojurescript.

Reply via email to