Description Usage Arguments Details Value Author(s) Examples
These tools are used for debugging and provide a means of examining the evaluation order of the function definitions as well as provide a lambda.r compatible debugger.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | debug.lr(x)
undebug.lr(x)
is.debug(fn.name)
which.debug()
undebug.all()
describe(...)
## S3 method for class 'lambdar.fun'
print(x, ...)
## S3 method for class 'lambdar.type'
print(x, ...)
|
x |
The function |
fn.name |
The name of the function |
... |
Additional arguments |
For a basic description of the function it is easiest to just type the
function name in the shell. This will call the print methods and print a
clean output of the function definition. The definition is organized based
on each function clause. If a type constraint exists, this precedes the
clause signature including guards. To reduce clutter, the actual body of the
function clause is not printed. To view a clause body, each clause is
prefixed with an index number, which can be used in the describe
function to get a full listing of the function.
describe(fn, idx)
The 'debug.lr' and 'undebug.lr' functions are replacements for the built-in debug and undebug functions. They provide a mechanism to debug a complete function, which is compatible with the dispatching in lambda.r. The semantics are identical to the built-ins. Note that these functions will properly handle non-lambda.r functions so only one set of commands need to be issued.
Lambda.r keeps track of all functions that are being debugged. To see
if a function is currently set for debugging, use the is.debug
function. To see all functions that are being debugged, use
which.debug
. It is possible to undebug all debugged functions
by calling undebug.all
.
The defined functions are invisibly returned.
Brian Lee Yung Rowe
1 2 3 4 5 6 7 | ## Not run:
f(x)
debug.lr(f)
which.debug()
undebug.lr(f)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.