Skip to content

Instantly share code, notes, and snippets.

@Morgawr
Created November 5, 2013 17:38
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Morgawr/7322960 to your computer and use it in GitHub Desktop.
I created a monster
(defmacro foreach
[bind _ coll _ & body]
`(doseq [~bind ~coll] ~@body))
; example
(foreach n in [1 2 3 4 5 6] do
(println (* n n )))
;prints 1 4 9 16 25 36 nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment