On Thu, Jul 21, 2011 at 10:13 PM, Ken Wesson <kwess...@gmail.com> wrote:
> On Thu, Jul 21, 2011 at 8:36 PM, octopusgrabbus
> <octopusgrab...@gmail.com> 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)

Er, that's weird. I don't know what happened there. Obviously that should be

(reduce
  (fn [param-vec 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))]
      (conj param-vec [accu-q-param billing-param])))
  []
  all-csv-rows)

-- 
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 clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to