Skip to content

Instantly share code, notes, and snippets.

@moea
Created July 8, 2014 20:25
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 moea/09f5465acec4f3333014 to your computer and use it in GitHub Desktop.
Save moea/09f5465acec4f3333014 to your computer and use it in GitHub Desktop.
(defmacro broken
[x]
(println (into {} (map (fn [[k v]] [(name k) (mapv str v)]) x))))
(broken x x {:a [a] :b [b]} x)
@edw
Copy link

edw commented Jul 8, 2014

(defmacro less-broken?
  [x]
  `(into {} (map (fn [[k v]] [(name k) (mapv str v)]) ~x)))

@edw
Copy link

edw commented Jul 8, 2014

(defmacro less-broken-er?
  [& x]
  `(into {} (map (fn [[k v]] [(name k) (mapv str v)]) ~x)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment