Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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))

viebel commented May 9, 2016

Here is a live version of this gist http://bit.ly/1VQUSNk

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