> (defmacro vmap [coll f] '(map ~f ~coll))
This needs to be backtick, not single quote.
(defmacro vmap [coll f] `(map ~f ~coll))
jack.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Not
Hi,
the following code is an example from a Clojure book. It defines a macro
named "vmap" that can work like "map" but with changed parameters:
(defmacro vmap [coll f] '(map ~f ~coll))
Now I try to use it:
(vmap [1 2 3] inc)
#
Does anyone know what is wrong with this code?
Thanks!
Christian.