O'Reilly logo
  • Gustavo Delfino thinks this is interesting:

Programs built this way are much easier to reason about because you can form a mental model of the state of the system and achieve the desired outcome through rewriting or substitution. Let’s look at this more concretely and assume that any program can be defined as a set of functions that processes a given input and produces an output. Here it is in pseudo form:


Cover of Functional Programming in JavaScript


I'm pretty sure that the print(run(0)) should actually be print(plus2(0))