Skip to content

Instantly share code, notes, and snippets.

@cemerick
Created February 25, 2014 12:07
Show Gist options
  • Save cemerick/9207672 to your computer and use it in GitHub Desktop.
Save cemerick/9207672 to your computer and use it in GitHub Desktop.
go-loop fail
; Clojure 1.6.0-alpha3, CLJS HEAD, [org.clojure/core.async "0.1.267.0-0d7780-alpha"]
; works
(go (loop [change (<! dom-change-chan)]
(when change
(js/console.log change)
(recur (<! dom-change-chan)))))
; doesn't work
(go-loop [change (<! dom-change-chan)]
(when change
(js/console.log change)
(recur (<! dom-change-chan))))
clojure.lang.ExceptionInfo: Can't recur here at line 4 <cljs repl> {:tag :cljs/analysis-error, :file "<cljs repl>", :line 4, :column 21}
nil
@ninjudd
Copy link

ninjudd commented Apr 5, 2014

@cemerick, I just ran into this. It is a bug, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment