Provides a hook object, which manages a list of closures to be called at certain time.
This API of hooks are upper-compatible of Guile’s, with the following extensions.
delete-hook!, for consistency with SRFI-1 and others.
remove-hook!is defined as an alias of
delete-hook!for compatibility with Guile.
A hook class, which keeps a list of procedures to be called at once.
object-apply method is defined on
so you can "apply" a hook object as if it were a procedure—which
causes all the registered procedure to be invoked.
Creates a new hook object with given arity, which should be a non-negative integer.
Returns true if obj is a hook object.
Returns true if hook’s procedure list is empty.
Adds a procedure proc to hook. If append?
is given and true, proc is added at the end of the list.
Otherwise, proc is added at the front of the list.
The proc has to be called with the arity given
Removes proc from the procedure list of hook.
Remove-hook! is an alias of
delete-hook! just for
compatibility with Guile.
Empties hook’s procedure list.
Returns a copy of hook’s procedure list.
Calls hook’s procedures in order, with arguments arg ….
The number of arguments must match the arity given at