Skip to content

Instantly share code, notes, and snippets.

@igrishaev
Created July 17, 2023 09:20
Show Gist options
  • Save igrishaev/3a84aedfc658d0c4bc9c153c7a2c8cfd to your computer and use it in GitHub Desktop.
Save igrishaev/3a84aedfc658d0c4bc9c153c7a2c8cfd to your computer and use it in GitHub Desktop.
(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