Hi!
I have something like this:
(defmacro testme[ & ops ]
`(do ~@(for[ op ops ]
`(println ~op))))
(macroexpand '(testme 1 2 3))
(testme 1 2 3)
How can I change the macro so "do" wouldn't be required?
When I do doseq instead of for the resulting value is nill.
(defmacro testme[ & ops ]
(doseq[ op ops ]
`(println ~op)))
(macroexpand '(testme 1 2 3))
(testme 1 2 3)
What is wrong with that?
The desired code should be just
(println 1)
(println 2)
(println 3)
Now I have
(do
(println 1)
(println 2)
(println 3) )
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en