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 <[email protected]>
> Can you post the code that poses problem ?
>
> 2009/4/2 [email protected] <[email protected]>
>
>
>> 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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---