5.9.6.2 Hook Reference

When you create a hook with make-hook, you must specify the arity
of the procedures which can be added to the hook. If the arity is not
given explicitly as an argument to make-hook, it defaults to
zero. All procedures of a given hook must have the same arity, and when
the procedures are invoked using run-hook, the number of
arguments passed must match the arity specified at hook creation time.

The order in which procedures are added to a hook matters. If the third
parameter to add-hook! is omitted or is equal to #f, the
procedure is added in front of the procedures which might already be on
that hook, otherwise the procedure is added at the end. The procedures
are always called from the front to the end of the list when they are
invoked via run-hook.

The ordering of the list of procedures returned by hook->list
matches the order in which those procedures would be called if the hook
was run using run-hook.

Note that the C functions in the following entries are for handling
Scheme-level hooks in C. There are also C-level hooks which
have their own interface (see C Hooks).