Re: Iteration or reduction on a transient map

2012-05-16 Thread Michał Marczyk
Well, I don't know if it's an explicit design goal of transients to not support these kinds of operations or if noone felt the need for them strongly enough to implement them. I believe transients are not meant to be the final solution to the problems which are currently addressed through their us

Re: Iteration or reduction on a transient map

2012-05-16 Thread nicolas.o...@gmail.com
So, if I have a transient and want to reduce it and then continue to use it transiently, I need to call persistent!, reduce and transient again. Is there a reason for that? (The documentation says that read operation are allowed. And it is actually possible to write a reduce for a transient vecto

Re: Iteration or reduction on a transient map

2012-05-16 Thread Michał Marczyk
If you want to reduce the map, there's nothing to be gained from the map being transient -- just use reduce-kv (or reduce pre-1.4) on the persistent map. If you want to map over the entries, again, there's nothing to be gained from the map being transient. (But if you want to pour the transformed

Iteration or reduction on a transient map

2012-05-16 Thread nicolas.o...@gmail.com
Dear all, Is there a way to apply a function to all members of a transient map? Best regards, Nicolas. -- 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 a