Re: Adding multiple entries in a vector with (something like) for.

2014-03-29 Thread Paul Schulz
ell you can always abuse syntax quote :) > > user=> `[:first :second ~@(for [x (range 1 5)] {:name (keyword (str > "third-" x))})] > [:first :second {:name :third-1} {:name :third-2} {:name :third-3} {:name > :third-4}] > > Jozef > > > On Sat, Mar 29, 2

Re: Adding multiple entries in a vector with (something like) for.

2014-03-29 Thread Paul Schulz
> (into [:first :second] (for [x (range 1 5)] {:name (keyword (str "third-" > x))})) > > Jozef > > > On Sat, Mar 29, 2014 at 9:25 AM, Paul Schulz > > wrote: > >> Greetings, >> I have a vector definition (containing maps), where a lot of th

Adding multiple entries in a vector with (something like) for.

2014-03-29 Thread Paul Schulz
Greetings, I have a vector definition (containing maps), where a lot of them are very similar. eg. [ :first :second {:name :third-1} {:name :third-2} ] I would like to use something like the following to replace the iterated rows (for [x (range 1 2)] {:name (keyword (str "thir