As a simple example of how functions may be specialized w.r.t.\
higher-order values we consider the specialization of a version of the map
function:
The residual function my-map-0 is a specialized version of my-map where the addition of one has been in-lined. Had map been defined as a primitive this would not have happened.
As can be seen from the example the higher order elements (the lambda-abstraction and the application) have been removed and the residual program is entirely first-order. In fact, if no lambda-abstraction is dynamic in a subject program, the residual program will be first-order. For interpreters using functions to represent environments this means that one may often get rid of the environment operations altogether when specializing the interpreter with respect to a program.