Re: Concatenating many lists (stack overflow problem)

2009-03-02 Thread Zededarian
seq >        (let [s (seq x)] >          (if s >            (cons (first s) (concat (rest s) y)) >            y >    ([x y & zs] >       (let [cat (fn cat [xys zs] >                   (lazy-seq >                    (let [xys (seq xys)] >                      (if xys >  

Re: Concatenating many lists (stack overflow problem)

2009-03-01 Thread Zededarian
epeatedly #(getline file) > > ;or, using vectors, and written more like your solution: > > (defn getstrlist [file] >   (loop [worklst []] >    (if-let [x (getline file)] >       (recur (into worklst x)) >      worklst))) > > Cheers, > Jason > > On Mar 1, 4:5

Concatenating many lists (stack overflow problem)

2009-03-01 Thread Zededarian
My ultimate goal is to get a list of all the words in a file in order. I have a function that will get a list of all the words on one line of this file in order, and I want to efficiently concatenate these lists to end up with one large list. I'm working with about 12000 lines right now, but in