On Fri, Jul 22, 2011 at 8:47 AM, octopusgrabbus
wrote:
>
> On Jul 21, 10:15 pm, Ken Wesson wrote:
>> On Thu, Jul 21, 2011 at 10:13 PM, Ken Wesson wrote:
>> > On Thu, Jul 21, 2011 at 8:36 PM, octopusgrabbus
>> > wrote:
>> >> And do you have a suggestion for a functional way?
>
> Is all-csv-rows
On Jul 21, 10:15 pm, Ken Wesson wrote:
> On Thu, Jul 21, 2011 at 10:13 PM, Ken Wesson wrote:
> > On Thu, Jul 21, 2011 at 8:36 PM, octopusgrabbus
> > wrote:
> >> And do you have a suggestion for a functional way?
Is all-csv-rows being re-bound with the results of [] and then
returned as the fun
An alternative is to use partition together with interleave:
user> (partition 2 (interleave [ 1 2 ] [ \a \b ]))
((1 \a) (2 \b))
Combined with (map vec ...) you should get:
user> (map vec (partition 2 (interleave [ 1 2 ] [ \a \b ])))
([1 \a] [2 \b])
user>
U
--
You received this message because
Thanks for the example.
On Jul 21, 10:15 pm, Ken Wesson wrote:
> On Thu, Jul 21, 2011 at 10:13 PM, Ken Wesson wrote:
> > On Thu, Jul 21, 2011 at 8:36 PM, octopusgrabbus
> > wrote:
> >> And do you have a suggestion for a functional way?
>
> > Yes. Change
>
> > (doseq [one-full-csv-row all-csv-ro
On Thu, Jul 21, 2011 at 10:13 PM, Ken Wesson wrote:
> On Thu, Jul 21, 2011 at 8:36 PM, octopusgrabbus
> 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 accum
On Thu, Jul 21, 2011 at 8:36 PM, octopusgrabbus
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 (
And do you have a suggestion for a functional way?
On Jul 21, 8:05 pm, Islon Scherer wrote:
> Simple: conj doesn't mutate the vector, it returns a new vector.
> Clojure is a (mostly) immutable language, you're trying to solve the
> problem in a imperative way, you should solve it in a functional
Simple: conj doesn't mutate the vector, it returns a new vector.
Clojure is a (mostly) immutable language, you're trying to solve the
problem in a imperative way, you should solve it in a functional way.
On Jul 21, 7:48 pm, octopusgrabbus wrote:
> (def accumail-url-keys ["CA", "STREET", "STREET2"
(def accumail-url-keys ["CA", "STREET", "STREET2", "CITY", "STATE",
"ZIP", "YR", "BILL_NO", BILL_TYPE"])
(defn ret-params
"Generates all q-parameters and returns them in a vector of
vectors."
[all-csv-rows]
(let [param-vec [[]] ]
(doseq [one-full-csv-row all-csv-rows]