4 ms·
Concepts from Functional Programming can be used to reduce the state space. First, do as much work as possible in pure functions. Pure functions can safely be
by Leftium 2y ago
Concepts from Functional Programming can be used to reduce the state space.
First, do as much work as possible in pure functions. Pure functions can safely be run in parallel, in any order because they do not have side-effects.
Then the side-effects can be applied. This code should be smaller/simpler since any work that can be done in a pure function was already done.
https://grokkingsimplicity.com/ https://grokkingsimplicity.com/ covers this topic in chapter 17: Coordinating timelines. The book even walks through a non-trivial example.