doseq-indexed
;; Example: | |
;; (doseq-indexed idx [name names] | |
;; (println (str idx ". " name) | |
(defmacro doseq-indexed-functional [index-sym [item-sym coll] & body] | |
`(doseq [[~item-sym ~index-sym] | |
(map vector ~coll (range))] | |
~@body)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
Here is a live version of this gist http://bit.ly/1VQUSNk