Created
July 17, 2023 09:20
-
-
Save igrishaev/3a84aedfc658d0c4bc9c153c7a2c8cfd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(def -m (doto (new java.util.HashMap) | |
(.put "a" 1) | |
(.put "b" 2))) | |
(defmacro for-each [[bind ^Iterable coll] & body] | |
`(.forEach conn | |
(reify java.util.function.BiConsumer | |
(accept [_# a b] | |
(println a b)))) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment