add_topdown_callback {foolbox} | R Documentation |
Add a function-specific callback to the top-down callbacks.
Description
This function adds to the existing topdown callback, rather than replace it, by putting a callback in front of it to be tested first. The callback will be invoked when the traversal sees a call to a specific function.
Usage
add_topdown_callback(callbacks, fn, cb)
Arguments
callbacks |
The existing callbacks. |
fn |
The function to which calls should be modified. |
cb |
The callback function to invoke. |
Details
The callback that is installed will be called with the usual callback
arguments (which depend on context and user-provided information to
..., see rewrite_callbacks()
and analysis_callbacks()
), and additionally
the next callback in line, through the parameter next_cb
. This can be
used to propagate information through several callbacks in a pipe-like
fashion.
Value
The updated callbacks.
[Package foolbox version 0.1.1 Index]