Functional Programming, JavaScript.
areaSquare(a) { return a * a; } function volumeCube(areaOfSquare, a) { return areaOfSquare * a; } a = 2; area = areaSquare(a); // -> 4 volume = volumeCube(area, a); // -> 8 The following expressions are equivalent: volume = a * a * a; volume = areaSquare(a) * a; volume = volumeCube(areaSquare(a));