Skip to content

Instantly share code, notes, and snippets.

@alandipert
Created May 27, 2013 20:00
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 alandipert/5658827 to your computer and use it in GitHub Desktop.
Save alandipert/5658827 to your computer and use it in GitHub Desktop.
str compiler macro cljs
(defmacro str [& xs]
(let [strs (->> (repeat (count xs) "cljs.core.str(~{})")
(interpose "+")
(apply core/str))]
(list* 'js* (core/str "(" strs ")") xs)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment