function
Methods on every closure.
Functions
| acall | function.acall(args: array): any | Calls the closure with the arguments taken from an array: args[0] becomes this, and the rest of args becomes the closure's own parameters. |
| bindenv | function.bindenv(env: table|instance|class): any | Returns a copy of the closure with env statically bound as its this: every future call to the copy uses env, no matter how it is called. |
| call | function.call(...): any | Calls the closure, using env as its this and forwarding the rest of the arguments as its own parameters. |
| clone | clone(): any | Returns the closure itself: unlike a table, array or class instance, a closure has no separate clone identity. |
| getfreevar | function.getfreevar(index: int): any | Returns the name and current value of one of the closure's free variables (the outer locals it captured when it was created). |
| getfuncinfos | function.getfuncinfos(): any | Returns a table describing the closure: its name, parameters, and other introspection data the VM tracks for it. |
| pacall | function.pacall(args: array): any | Calls the closure like acall does, taking this and the arguments from an array: args[0] becomes this, and the rest of args becomes the closure's own parameters. |
| pcall | function.pcall(...): any | Calls the closure like call does, using env as its this and forwarding the rest of the arguments as its own parameters. |
| tostring | tostring(): any | Returns a string that names the type and identity of the closure. |
| weakref | weakref(): any | Returns a weak reference to the closure. |