Replace the function f with a dispatch so that function r is called when f is called with the first argument of the named type. If the type is any then call r if no other type matches. The original function f is accessible using
builtin (
f, ...)
.If r is omitted, clear dispatch function associated with type.
If both r and type are omitted, list dispatch functions for f.
See also: builtin