Re: Clojure 1.3 head holding bug

2011-11-28 Thread Alan Malloy
On Nov 28, 1:55 pm, Juha Arpiainen wrote: > On Nov 27, 3:59 am, Gerrard McNulty wrote: > > Hi, > > > I've a head holding problem that I believe is a bug in clojure 1.3.  I > > wrote the following function to split a a lazy seq of strings across > > files of x size: > > > (defn split-file > >   ([

Re: Clojure 1.3 head holding bug

2011-11-28 Thread Juha Arpiainen
On Nov 27, 3:59 am, Gerrard McNulty wrote: > Hi, > > I've a head holding problem that I believe is a bug in clojure 1.3.  I > wrote the following function to split a a lazy seq of strings across > files of x size: > > (defn split-file >   ([path strs size] >      (trampoline split-file path (seq s

Re: Clojure 1.3 head holding bug

2011-11-28 Thread Alan Malloy
Interesting. It seems to me like locals-clearing should take care of this for you, by preparing a call to trampoline, then setting the locals to nil, then calling trampoline. But you can solve this easily enough yourself, in this particular case, by splitting the strings up into chunks before you o

Clojure 1.3 head holding bug

2011-11-27 Thread Gerrard McNulty
Hi, I've a head holding problem that I believe is a bug in clojure 1.3. I wrote the following function to split a a lazy seq of strings across files of x size: (defn split-file ([path strs size] (trampoline split-file path (seq strs) size 0)) ([path strs size part] (with-open [f (c