This is the ThingsDB documentation for version v0, click here for the latest version!
Returns the closure definition using spaces, line-breaks and indentation (4 spaces).
This function does not generate an event.
closure.def()
None
Returns the closure definition.
This code creates a closure with a doc string:
add_one = |x| {
x + 1;
};
// Return the definition as a string
add_one.def();
Return value in JSON format
"|x| {\n x + 1;\n}"
Or, when printed:
|x| {
x + 1;
}