Skip to content

Instantly share code, notes, and snippets.

@jcromartie
Created April 25, 2013 12:32
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 jcromartie/5459350 to your computer and use it in GitHub Desktop.
Save jcromartie/5459350 to your computer and use it in GitHub Desktop.
parallel let in Clojure
(defmacro plet [bindings & forms]
(let [pairs (partition 2 bindings)
names (map first pairs)
vals (map second pairs)]
`(let [[~@names] (pvalues ~@vals)] ~@forms)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment