e.g. the following code works very well for me (so I had to stop it before
the file size became > to 1 Gbyte :-) :

;; file test.clj

(ns test)

(defn infinite [] (repeat "a line"))

(defn t []
    (with-open [w (java.io.FileWriter. (java.io.File. "/tmp/test"))]
        (doseq [l (infinite)]
          (.write w (str l "\n")))))

HTH,

-- 
Laurent


2009/4/2 Laurent PETIT <laurent.pe...@gmail.com>

> Can you post the code that poses problem ?
>
> 2009/4/2 fitzpatrick...@googlemail.com <fitzpatrick...@googlemail.com>
>
>
>> Hi,
>> I am attempting to print a large lazy seq to file. I have attempted
>> various approaches and obviously am missing something obvious.
>> I have attempted do use do-seq and also iterated manually through the
>> sequence but i always come up with the heap error.
>> Has anyone got any suggestions?
>> tks,
>> PJ
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
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
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