replace-operator declaration is provided to inform the
compiler that certain operators may be replaced by other operators
depending on the number of arguments.
(declare (replace-operator (map (2 map-2) (3 map-3))))
(map f x y z) → (map f x y z) (map f x y) → (map-3 f x y) (map f x) → (map-2 f x) (map f) → (map f) (map) → (map)
map-3 are efficient versions of
map that are written for exactly two and three arguments
respectively. All the other cases are not expanded but are handled by
the original, general
map procedure, which is less efficient
because it must handle a variable number of arguments.
The syntax of this declaration is
(replace-operator (name (nargs1 value1) (nargs2 value2) …))
(primitive primitive-name [arity])
The primitive procedure named primitive-name. The optional element arity, a non-negative integer, specifies the number of arguments that the primitive accepts.
A global variable.
The meanings of these fields are:
otherwise, then the operation is replaced with a call to the corresponding valueN. Only one of the nargsN may be of this form.
otherwise, then the operation is not replaced.