Skip to content

Instantly share code, notes, and snippets.

@jeremyheiler
Last active December 23, 2015 20:59
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 jeremyheiler/6693451 to your computer and use it in GitHub Desktop.
Save jeremyheiler/6693451 to your computer and use it in GitHub Desktop.
(defmacro apply (f arr)
`(f ~@arr))
(apply str ["foo" "bar" "baz"])
;; macroexpands to:
(str "foo" "bar" "baz")
;; which emits:
"foo" + "bar" + "baz"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment