8471 shaares
203 private links
203 private links
Instead of thinking in terms of a function that modifies multiple objects, you think in terms of a function that computes a description of how multiple objects should be affected, then a separate interpreter of that data type that animates that description into real action.
A minimal representation is the events of the DOM: they describe a change.
The author describes the advantages of such.
Note that Rust or Typescript are good candidates to represent algebraic data types.