MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 1 | SYNOPSIS |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame] | 2 | closure unbound_lambda(mixed *args, mixed) |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 3 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame] | 4 | DESCRIPTION |
| 5 | Constructs a lambda closure that is not bound to an object, |
| 6 | like lambda function in LISP. |
| 7 | The closure cannot contain references to global variables, and |
| 8 | all lfun closures are inserted as is, since there is no native |
| 9 | object for this closure. You need to bind it before it can be |
| 10 | called. Ordinary objects can only bind to themselves, binding |
| 11 | to other objects causes a privilege violation(). The point is |
| 12 | that previous_object for calls done from inside the closure |
| 13 | will reflect the object doing bind_lambda(), and all object / |
| 14 | uid based security will also refer to this object. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 15 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame] | 16 | The first argument is an array describing the arguments |
| 17 | (symbols) passed to the closure upon evaluation by funcall() |
| 18 | or apply(), the second arg forms the code of the closure. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 19 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame] | 20 | HISTORY |
| 21 | Introduced in 3.2@82. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 22 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame] | 23 | SEE ALSO |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 24 | closures(LPC), lambda(E), apply(E), funcall(E), bind_lambda(E) |