i had a cljs repl up and running...here's the comparison and the emitted JS
ClojureScript:cljs.user> (= 0 0 0) true ; js => cljs.core._EQ_.call(null,0,0,0); ClojureScript:cljs.user> (= 0 0 1) true ; js => cljs.core._EQ_.call(null,0,0,1); ClojureScript:cljs.user> (== 0 0 1) false ; js => (function (){var and__3546__auto____4873 = (0 === 0); if(cljs.core.truth_(and__3546__auto____4873)) {return (0 === 1); } else {return and__3546__auto____4873; } })(); ClojureScript:cljs.user> (== 0 0 0) true ; js => (function (){var and__3546__auto____4879 = (0 === 0); if(cljs.core.truth_(and__3546__auto____4879)) {return (0 === 0); } else {return and__3546__auto____4879; } })(); So...looks like it's just = vs == (or even ===) Neale {t: @sw1nn, w: sw1nn.com} On Wed, Feb 29, 2012 at 11:26 PM, Alan Malloy <a...@malloys.org> wrote: > > On Feb 29, 2:36 pm, Benjamin Peter <benjaminpe...@arcor.de> wrote: > > Hello, > > > > when I was trying to port a little clojure app to clojurescript I > > think I noticed a difference in behavior of the "for" macro. > > > > I am quite new to clojure and maybe you can tell me where my problem > > is or if my assumptions that there might be a problem could be > > correct. > > > > As far as I see it, the "for" macro works for clojurescript quite well > > but I am not sure if it is "supported". > > > > I am using a two dimensional "for" with a ":when" condition. I already > > tried to narrow the problem down but this was the closest I could get > > so far. It seems like some elements are missing in the output. > > > > (for [a [0 1] b [0 1] > > :when (not (= 0 a b))] > > [a b]) > > > > In clojurescript seems to result in: > > > > [[1 0] [1 1]] > > > > Wrapping to doall doesn't change a thing, but could lazyness be a > > problem? > > > > I put together a little project you could check out, please have a > > look: > > > > https://github.com/dedeibel/cljs-fortest > > Isn't this a special case of cljs not having the right equality > semantics for multiple args? I don't have a clojurescript repl handy, > but I remember reading it only looks at the first two args, so (= 0 0 > 1) returns true, keeping that one out of your results. > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en