3 ms·
One insight is that functional programming and pure functional programming are very different beasts. As an example, Clojure does not aim to be pure, Haskell do
by augustl 13y ago
One insight is that functional programming and pure functional programming are very different beasts. As an example, Clojure does not aim to be pure, Haskell does. In Clojure, the focus is on immutability, and state is modeled as a succession of immutable values. Example: the employees in a company is represented as an immutable value. A place (a ref) stores the current immutable value, and you can always ask this ref for that value, and set it to a new one. But the value itself is always immutable. In Haskell, everything must be pure, and uses monads to models things such as random number generators, I/O, and other side effects.