Skip to content

Instantly share code, notes, and snippets.

@pervognsen
Created March 9, 2010 02:07
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 pervognsen/326073 to your computer and use it in GitHub Desktop.
Save pervognsen/326073 to your computer and use it in GitHub Desktop.
(defn zip [& xss]
(apply map (fn [& xs] xs) xss))
(defmacro eager [[f & xs]]
(let [syms-and-xs (zip (repeatedly gensym) xs)]
`(let [~@(apply concat syms-and-xs)]
(~f ~@(map first syms-and-xs)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment