On Aug 3, 7:27 pm, CuppoJava <patrickli_2...@hotmail.com> wrote:
> Hi Rich,
> This is a very useful addition thanks. I personally find the O(1)
> transformation to and back most useful.
>
> I have a question about capturing the return values of conj! and
> assoc!.
>
> in this code:
> (let [v (transient [])
>        v2 (conj! v 0)])
>
> v2 is the captured return value from conj!, which you're supposed to
> use for future operations. But what does v point to now?

I'm not promising it points to anything useful. It is an
implementation detail of the current version that (conj! v x) returns
v. You should consider each operation to destroy the transient
argument and return another.

Rich

--~--~---------~--~----~------------~-------~--~----~
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 are moderated - please be patient with your 
first post.
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