i faced a super weird issue today
(let [t :cognitive
tab (name t)
tab-name (string/join "" (take 3 (string/split tab #"")))]
(println "@@@" t tab tab-name))
returns
@@@ :cognitive cognitive cog
in clojure, but
@@@ :cognitive cognitive co
in clojurescript (rendered using reagent). notice the missing g in the cljs version
i have tried doall before-and-after the (take 3 ... expression, but to no avail
BTW, i'm using
[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.170"]
for my cljs project, and
[org.clojure/clojure "1.8.0"]
for the clj project
string/spliton the string, but just thought I'd mention that strings are coerced to sequences. So you could just use(take 3 tab)in your example. - Nathan Davis