Thanks for the help!
I created a small function, which convert the nodes of a nested
collection to strings:
(defn rec-to-strs [f]
"recursively change parameters to strings"
(vec (for [c f]
(if (coll? c)
(vec (rec-to-strs c))
(str c)
I use this function from a macro as
Or, you could just write foo as
;;Adjusting for 2d
(defmacro foo
[vec-vec-of-symbols]
(let [vec-vec-of-str (vec (map (comp vec (partial map str)) vec-vec-
of-symbols))]
`(foo* ~vec-vec-of-str)))
This let you write foo* to handle strings. Anyway, the key thing to
note in both examples is t
Hi,
On Oct 22, 4:22 pm, Tzach wrote:
> I’m writing a small facility which get vector of vectors of names
> (strings) and print them in a special format.
> Something like (foo [[“aname” “a-different-name”] [ “oneMoreName”]])
> This works fine, but make it hard to write all the quotations when
>
Yes, a macro is required. Otherwise the symbols are evaluated.
On Oct 22, 10:22 am, Tzach wrote:
> Hello all
> I’m writing a small facility which get vector of vectors of names
> (strings) and print them in a special format.
> Something like (foo [[“aname” “a-different-name”] [ “oneMoreName”]])