Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JacobNinja/f463717d99aadc0d903ebdb6c67c7f3b to your computer and use it in GitHub Desktop.
Save JacobNinja/f463717d99aadc0d903ebdb6c67c7f3b to your computer and use it in GitHub Desktop.
Loop/recur compiled example
cljs.user=> (defn foo [] (loop [i 1] (if (>i 10) i (recur (inc i)))))
#'cljs.user/foo
cljs.user=> foo
#object[cljs$user$foo "function cljs$user$foo(){
var i = 1;
while(true){
if(cljs.core.truth_(cljs.user._GT_i.call(null,10))){
return i;
} else {
var G__23 = (i + 1);
i = G__23;
continue;
}
break;
}
}"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment