You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: adopting-the-clojure-mindset.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ Immutable `assoc` is tailor-made for truly persistent types, like records. But
60
60
61
61
The same applies to `conj` or any other command one imagines. It's possible to simulate change against any type. All simulation requires is an atom or, in Atomic, a cell. The cell contains the state and [`swap`](https://clojuredocs.org/clojure.core/swap!)s updates against it using simulated commands.
62
62
63
-
What this effectively means is the above table can, as desired, be fully realized so that any mutable operation can also be simulated, written as reductive operations. What this reaveals is all programs are, at their very centers, [reductions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce).
63
+
What this effectively means is the above table can, as desired, be fully realized so that any mutable operation can also be simulated, written as a reductive operation. What this reaveals is all programs are, at their very centers, [reductions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce).
64
64
65
65
That's the cornerstone of how Clojure models state change. And where Clojure actually has a robust set of persistent types, JavaScript doesn't. So Atomic uses reference types and pure protocols/functions to emulate persistent types. In practice, this proves performant enough to be of little concern.
0 commit comments