I apologize in advance for lacking some vocabulary here. Going through Structure and Interpretation of Computer Programs, there is an early reference to 'combinations whose operators are themselves compound expressions', e.g.:
(define (a-plus-abs-b a b)
((if (> b 0) + -) a b))
where the combination (if (> b 0) + -)
is evaluated as either a +
or -
, which is then evaluated as e.g. (+ a b)
if b is greater than zero.
My question is: Is this different from a variable function (e.g. in PHP), and how so? Also, do variable functions and this functionality differ from using Javascript-style object references?