Skip to content

Commit 4ef2e36

Browse files
author
Mario T. Lanza
committed
edit copy
1 parent e867c88 commit 4ef2e36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adopting-the-clojure-mindset.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Immutable `assoc` is tailor-made for truly persistent types, like records. But
6060

6161
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.
6262

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).
6464

6565
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.
6666

0 commit comments

Comments
 (0)