6 ms·
This video explains how all branching was removed by refactoring an imperative-style function into functional-style. The original code is on the top, the refact
by Leftium 4y ago
This video explains how all branching was removed by refactoring an imperative-style function into functional-style. The original code is on the top, the refactored code is on the bottom: https://youtu.be/GyYME8btMHE?t=1473 https://youtu.be/GyYME8btMHE?t=1473
Generally, this type of refactoring converts code to a more declarative style: tell the computer what to do instead of how to do it (if-then-else): https://www.wikiwand.com/en/Declarative_programming https://www.wikiwand.com/en/Declarative_programming
So you're probably looking for a declarative programming paradigm. (A single programming language can support multiple paradigms.)