|
Reduct
v4.0.5-1-g4851deb
A functional and immutable language.
|
A closure is a function instance that has captured variables from its enclosing scope.
Data Structures | |
| struct | reduct_closure_t |
| Closure structure. More... | |
Macros | |
| #define | REDUCT_CLOSURE_SMALL_MAX 5 |
| The maximum number of small constants. | |
Functions | |
| REDUCT_API reduct_closure_t * | reduct_closure_new (struct reduct *reduct, reduct_function_t *function) |
| Allocate a new closure. | |
| REDUCT_API void | reduct_closure_retain (struct reduct *reduct, reduct_closure_t *closure) |
| Retain a closure, preventing it from being collected by the garbage collector. | |
| REDUCT_API void | reduct_closure_release (struct reduct *reduct, reduct_closure_t *closure) |
| Release a closure, potentially allowing the garbage collector to collect it. | |
| #define REDUCT_CLOSURE_SMALL_MAX 5 |
| REDUCT_API reduct_closure_t * reduct_closure_new | ( | struct reduct * | reduct, |
| reduct_function_t * | function | ||
| ) |
Allocate a new closure.
| reduct | Pointer to the Reduct structure. |
| function | The prototype function item. |
| REDUCT_API void reduct_closure_retain | ( | struct reduct * | reduct, |
| reduct_closure_t * | closure | ||
| ) |
Retain a closure, preventing it from being collected by the garbage collector.
| reduct | Pointer to the Reduct structure. |
| closure | Pointer to the closure. |
| REDUCT_API void reduct_closure_release | ( | struct reduct * | reduct, |
| reduct_closure_t * | closure | ||
| ) |
Release a closure, potentially allowing the garbage collector to collect it.
| reduct | Pointer to the Reduct structure. |
| closure | Pointer to the closure. |