my-fn takes a number and a string as argument and outputs a string. I am
using map-indexed and my-fn to comprehend a list of items with numbered
index as follows,
(map-indexed (fn [idx itm] (my-fn idx itm)) '(list-of-crap))
When i run this on the repl everything works well and I get a single long
string of output. But, I am trying to use the output of this function in a
report and it is not working in that context.
The code to generate report looks something like this:
(str
string1
string2
string3
(map-indexed (fn [idx itm] (my-fn idx itm)) '(listofcrap))
string4....etc...
)
The code above will just print out 'clojure-lazy-seq' instead of the string
output. If I try:
(apply str (map-indexed (fn [idx itm] (my-fn idx itm)) '(listofcrap)))
Then I get the last item from my list properly formated in the report, but
that's all. How do I print out everything? Thanks
--
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
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.