lenv.h file
Contents
- Reference
Functions
- auto lenv_new(void) -> lenv*
- Constructs a new lenv.
- void lenv_del(lenv* env)
- Destroys the lenv
env
. - auto lenv_get(lenv* env, const lval* key) -> lval*
- Gets an lval from an lenv.
- auto lenv_copy(const lenv* env) -> lenv*
- TODO.
- void lenv_put(lenv* env, const lval* key, lval* value)
- Sets an lval in an lenv.
- void lenv_def(lenv* env, const lval* key, lval* value)
- TODO.
- void lenv_add_builtin(lenv* env, const char* name, lbuiltin func)
- Adds a builtin function to the environment.
- void lenv_add_builtins(lenv* env)
- Adds all the builtin functions to the environment.
Function documentation
void lenv_add_builtin(lenv* env, const char* name, lbuiltin func)
Adds a builtin function to the environment.
Parameters | |
---|---|
env | |
name | - type: char* |
func |
Adds a builtin function to the environment with the name name
and the function signature func
.
void lenv_add_builtins(lenv* env)
Adds all the builtin functions to the environment.
Adds all the builtin functions to the environment.