Re: Using transients within fold

2013-03-14 Thread Paul Butcher
On 14 Mar 2013, at 13:13, David Powell wrote: > As a temporary hack, perhaps you could implement a deftype ReduceToTransient > wrapper that implements CollReduce by calling reduce on the parameter, and > then calling persistent! on the return value of reduce. You'd also need to > implement Co

Re: Using transients within fold

2013-03-14 Thread David Powell
As a temporary hack, perhaps you could implement a deftype ReduceToTransient wrapper that implements CollReduce by calling reduce on the parameter, and then calling persistent! on the return value of reduce. You'd also need to implement CollFold so that the partitioning function produces wrapped r

Re: Using transients within fold

2013-03-14 Thread Meikel Brandmeyer (kotarak)
You could use the proposed change (second link) and use a patched clojure in your application. Meikel -- -- 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 Note that posts from new members

Re: Using transients within fold

2013-03-14 Thread Paul Butcher
On 14 Mar 2013, at 11:49, Meikel Brandmeyer (kotarak) wrote: > that's not really possible at the moment. cf. > https://groups.google.com/d/topic/clojure-dev/UbJlMO9XYjo/discussion and > https://github.com/cgrand/clojure/commit/65e1acef03362a76f7043ebf3fe2fa277c581912 Dang. At least other peopl

Re: Using transients within fold

2013-03-14 Thread Meikel Brandmeyer (kotarak)
Hi, that's not really possible at the moment. cf. https://groups.google.com/d/topic/clojure-dev/UbJlMO9XYjo/discussion and https://github.com/cgrand/clojure/commit/65e1acef03362a76f7043ebf3fe2fa277c581912 Kind regards Meikel -- -- You received this message because you are subscribed to the

Using transients within fold

2013-03-14 Thread Paul Butcher
I've been experimenting with reducers using a small example that counts the words in Wikipedia pages by parsing the Wikipedia XML dump. The basic structure of the code is: (frequencies (flatten (map get-words (get-pages where get-pages returns a lazy sequence of pages from the XML dump and