Skip to content

Instantly share code, notes, and snippets.

@mattdeboard
Created September 28, 2013 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattdeboard/bf1c291b96e048461c19 to your computer and use it in GitHub Desktop.
Save mattdeboard/bf1c291b96e048461c19 to your computer and use it in GitHub Desktop.
(ns clj-typeshooter.macros
(:require
[clojure.core.async :refer :all]))
(defmacro go-handle! [update-ch & body]
"Execute `body' inside goroutine, then send data to channel `update-ch'."
`(go
(do ~@body)
(>! update-ch 1)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment