Skip to content

Instantly share code, notes, and snippets.

@michaelsbradleyjr
Created June 14, 2012 01:31
Show Gist options
  • Save michaelsbradleyjr/2927586 to your computer and use it in GitHub Desktop.
Save michaelsbradleyjr/2927586 to your computer and use it in GitHub Desktop.
;; doesn't work
(map #([(% 0) (% 2)]) [[1 2 3] ["a" "b" "c"]])
;; throws...
;; Wrong number of args (0) passed to: PersistentVector
;; [Thrown class clojure.lang.ArityException]
;; works
(map #(vector (% 0) (% 2)) [[1 2 3] ["a" "b" "c"]])
;; => ([1 3] ["a" "c"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment