Thoughts/notes from reading http://worrydream.com/LadderOfAbstraction/
the purpose of abstraction is to bring out high-level patterns
We stepped up a level of abstraction to see a high-level pattern, and then stepped down to discover the explanation for that pattern. I believe that this dance is where the deepest insights are born - not at any one level of abstraction, but in the transitions between them. This is why it is crucial that our representations provide both a step up and a step back down.
function f() {
const t = 100;
const r = 2;
const [x, y] = calculate(t, r);
return [x, y];
}
function f(t) {
const r = 2;
const [x, y] = calculate(t, r);
return [x, y];
}
function f(t, r) {
const [x, y] = calculate(t, r);
return [x, y];
}
r
is currying:
const f_of_2 = t => f(t, 2);