4 ms·
Yeah, I do not understand where the author is coming from. One could easily write a helper function in JavaScript that does the same thing that the author's Clo
by axguscbklp 5y ago
Yeah, I do not understand where the author is coming from. One could easily write a helper function in JavaScript that does the same thing that the author's Clojure "cond" does. There is no need to use an IIFE if one does not want to.
- madia_leva 5y agoHmmmm... I wonder how you would avoid the expressions from being evaluated without wrapping then in a function (sorry if it's a lame question, I haven't done any JS in years). Not that there is anything wrong with lambdas, but it's quite a los of boilerplate for something as simole as a cond.