4 ms·
If you evaluate your expression on two different threads, the value of c is non-deterministic. On the other hand, if you call (swap! c (partial * 2)) on
by prospero 16y ago
If you evaluate your expression on two different threads, the value of c is non-deterministic. On the other hand, if you call
(swap! c (partial * 2))
on two separate threads, c will always end up 4x the original value.
These limitations exist for a reason.
- weavejester 16y agoIt's worth noting you could also write: (swap! c * 2)
- prospero 16y agoYeah, I just thought that looked close enough to infix notation to be confusing.