On Thu, Jul 21, 2011 at 8:36 PM, octopusgrabbus
<[email protected]> wrote:
> And do you have a suggestion for a functional way?
Yes. Change
(doseq [one-full-csv-row all-csv-rows]
(let [accumail-csv-row one-full-csv-row
q-param (zipmap accumail-url-keys accumail-csv-row)
accu-q-param (first (rest (split-at 3 q-param)))
billing-param (first (split-at 3 q-param))]
(conj param-vec accu-q-param billing-param)))
to
(reduce
(fn [one-full-csv-row]
(let [q-param (zipmap accumail-url-keys one-full-csv-row)
accu-q-param (first (rest (split-at 3 q-param)))
billing-param (first (split-at 3 q-param))]
[accu-q-param billing-param]))
[]
all-csv-rows)
(This is assuming you want an output of the form
[[accu-q-param-1 billing-param-1][accu-q-param-2 billing-param-2]...].)
--
Protege: What is this seething mass of parentheses?!
Master: Your father's Lisp REPL. This is the language of a true
hacker. Not as clumsy or random as C++; a language for a more
civilized age.
--
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