Thanks, that is useful advice.

I do think that the docstring for assoc! could be more explicit about the 
dangers of not using the return value. 

Given the value placed in experimenting in the REPL it's easy to see how 
one could be fooled into using assoc! incorrectly.


On Friday, 24 November 2017 16:52:15 UTC, Stuart Sierra wrote:
>
> The way I like to think of it, if it helps: Transients are still 
> *immutable*, but they are not *persistent*. Each new value *invalidates* 
> the previous value.
>
> –S
>
>
> On Friday, November 24, 2017 at 11:01:48 AM UTC-5, Alex Miller wrote:
>>
>> Transients must still be used in the same calling pattern as persistent 
>> data structures. That is, you must use the value returned from the ! call 
>> to make the next call. 
>>
>

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to