Fork me on GitHub

@seancorfield: right - i’ll try to avoid that approach in the future (directly translating from js to cljs)


i wonder if there any resources that show you how js code is mapped to cljs code'


Unlikely — because of the above considerations. You can’t map at the code level, you have to map at the problem solution level.


It can take a while to get into the FP mindset, don't be discouraged. 🙂 What helped me (coming from a js background) was that before I started doing clojure, I'd experimented with RxJS


From a js background, I was used to using transpilers which mapped 1-to-1 with js (Babel and Coffeescript for example) Clojurescript is totally different.


i’m not sure if the community at large could use this, but i have a lot of code samples where i’ve basically translated js stuff into cljs versions that could be good examples; it was a lot of pain for me to learn like this and i - think - it might be helpful for others?


it’s definitely not idiomatic code, but it is the same output for both js and cljs versions


@krchia: I made such a comparison in a presentation for the Paris.js Javascript meetup, maybe it'll help: