Skip to content

Instantly share code, notes, and snippets.

@hlship
Created May 6, 2016 18:43
Show Gist options
  • Save hlship/a7f99b1b290e8d50e116a7b2d2bcefc9 to your computer and use it in GitHub Desktop.
Save hlship/a7f99b1b290e8d50e116a7b2d2bcefc9 to your computer and use it in GitHub Desktop.
looping state
(go-loop [n 0]
(when-let [x (<! input-ch)]
(>! output-ch x)
(recur (inc n))
n))
@ajpierce
Copy link

ajpierce commented Feb 8, 2017

This does not appear valid in Clojure 1.8

ExceptionInfo Can only recur from tail position  clojure.core/ex-info (core.clj:4617)

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