-
-
Save sorenmacbeth/0b0a49dff6e01879de986a0b0c89a604 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn hinted-iterator [x] | |
(.iterator ^java.lang.Iterable x)) | |
(defmacro iterator-fn | |
[& body] | |
(let [[args & biz] body | |
it-biz (cons 'hinted-iterator biz) | |
it-body (cons args (list it-biz))] | |
`(fn ~@it-body))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment