Closed fasterthanlime closed 9 years ago
Not only in loop.
loop
Also:
(loop [i 0 j 0] (when (< i 10) (prn "i = " i) (recur (inc i) j)))
(function () { var $$__i1 = 0; var $$__j2 = 0; var recur = null; var $$__loopret3 = null; while (true) { if ($s.call(null, $$__i1, 10)) { prn.call(null, 'i = ', $$__i1); $$__loopret3 = recur = [ inc.call(null, $$__i1), $$__j2 ]; } else { } if (recur) { $$__i1 = recur[0]; $$__j2 = recur[1]; recur = null; continue; } else { } break; } return $$__loopret3; }());
var i_7994 = 0; var j_7995 = 0; while (true) { if ((i_7994 < 10)) { cljs.core.prn.call(null, "i = ", i_7994); { var G__7996 = (i_7994 + 1); var G__7997 = j_7995; i_7994 = G__7996; j_7995 = G__7997; continue; } } else {} break; }
So we can do better. Much better.
Not only in
loop
.Also:
Cljs code
Shin output
Reference output
So we can do better. Much better.