`(let [x 5] (+ x 4))` works fine for me. On Fri, Nov 27, 2015 at 2:19 PM, <[email protected]> wrote:
> can I ask, how do you evaluate expressions that refer to local bindings ? > Say I have an expression (+ x 4) that refers to x (not bound in the > expression) and I create a new expression from it that puts it inside a > (let [x 5] (+ x 4)) say, I get an error if I try to evaluate this. > > On Monday, November 23, 2015 at 5:34:00 AM UTC, Maria Geller wrote: > > For evaluating ClojureScript in ClojureScript you need to use the > cljs.js namespace ( > https://github.com/cljsinfo/cljs-api-docs/blob/catalog/refs/library/cljs.js.md). > Here is a gist with a small example: > https://gist.github.com/mneise/36c0bbae83b19c056781 > > > > On Sunday, November 22, 2015 at 11:19:29 AM UTC-5, Yehonathan Sharvit > wrote: > > > Following this (great) talk by > https://www.youtube.com/watch?v=Elg17s_nwDg > > > I tried to comile cljs in cljs. > > > > > > The following code didn't work > > > > > > (->> (cljs.tools.reader/read-string "(inc 2)") > > > (cljs.analyzer/analyze {})) > > > > > > I got a js error: > > > > > > Uncaught #error {:message "Cannot read property 'findInternedVar' of > null", :data {:tag :cljs/analysis-error} > > > > > > > > > Who could help? > > -- > Note that posts from new members are moderated - please be patient with > your first post. > --- > You received this message because you are subscribed to a topic in the > Google Groups "ClojureScript" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/clojurescript/5ZUvk7RPB9I/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/clojurescript. > -- "Are we what we become or do we become what we are?" - Prof. Beno Gross -- 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 http://groups.google.com/group/clojurescript.
