One of the most important ideas in software development is: keep it simple.
The problem is, every developer seems to believe all code they write is simple & beautiful (... of course).
Without getting into the tar pit of defining "Simple Code" - I'll show one method which has worked well for me.
Goals: write focused, pluggable & testable code by following 2 rules:
1. Restrict functions to single-purpose.
AND
2. Restrict functions to only 1 argument (or 2 for (err, value) style).
This can be an array or object with many dimensions.
Let's write some example "Higher Order Functions" to do multiple math steps/functions.
Pure ES2016 - no "frameworks" - just a tape test.