title: How to expand macros in ClojureScript's cljs.core namespace
body: <p>I was curious about what certain macros were doing and tried to call <code>(macroexpand-1)</code> to get more info. However, I'm a little confused about how to expand the built-in macros in ClojureScript, particularly the macros in the <code>cljs.core</code> namespace. According to the docs, ClojureScript macros are written in Clojure and therefore have to be tested in a Clojure REPL (instead of a ClojureScript REPL), which is where I've been trying this from.</p>
  
  <p>Running <code>lein repl</code> from my ClojureScript project's directory, I've tried this:
  </p>
  
  <pre><code>=&gt; (require 'cljs.compiler)
  =&gt; (require 'cljs.core)
  =&gt; (macroexpand-1 '(cljs.core/int 99.9))
  (macroexpand-1 '(cljs.core/int 99.9))
  (cljs.core/int 99.9)
  </code></pre>
  
  <p>Why does that return <code>(cljs.core/int 99.9)</code>? Based on the <a href="https://github.com/clojure/clojurescript/blob/master/src/clj/cljs/core.clj#L418" rel="nofollow">ClojureScript source</a>, shouldn't that macro expand to something like <code>(bit-or ~x 0)</code>? </p>
  
  <p>When I expand non-ClojureScript macros, such as <code>(macroexpand-1 '(when (even? 2) (println "2 is even")))</code>, the expansion seems to work fine.</p>
  
  <p>Seems like I'm missing something conceptually...</p>