Picore
Provides LISP core functions: eval and apply. More...
Functions | |
cell * | eval (cell *expression, cell *env) |
Evaluates one sexpression and returns the result. More... | |
cell * | apply (cell *fn, cell *args, cell *env, bool eval_args) |
Applies the function to the args in the environment. More... | |
cell * | pairlis (cell *symbols_list, cell *values_list, cell *env) |
Creates a new list of pairs symbol-values starting from another. It's used to extend one environment. More... | |
cell * | assoc (cell *symbol, cell *env) |
Associates one symbol to one values in the environment. More... | |
cell * | evlis (cell *args, cell *env) |
Evaluates the cars of the list in the environment. It's called when a lambda is evaluated: first the list of the arguments of the lambda will be evaluated with this function. More... | |
cell * | evcon (cell *args, cell *env) |
Evaluates the cond-special form. More... | |
cell * | eval_atom (cell *expression, cell *env) |
cell * | eval_atom_function (cell *expression, cell *env) |
cell * | eval_composed_function (cell *expression, cell *env) |
cell * | eval_macro (cell *expression, cell *env) |
cell * | apply_atom_function (cell *fn, cell *args, cell *env, bool eval_args) |
cell * | apply_composed_function (cell *fn, cell *args, cell *env, bool eval_args) |
cell * | apply_lambda (cell *fn, cell *args, cell *env, bool eval_args) |
cell * | apply_lasm (cell *fn, cell *args, cell *env, bool eval_args) |
cell * | apply_label (cell *fn, cell *args, cell *env, bool eval_args) |
cell * | apply_macro (cell *fn, cell *args, cell *env, bool eval_args) |
cell * | eval_lambda_and_apply (cell *fn, cell *args, cell *env, bool eval_args) |
Detailed Description
Provides LISP core functions: eval and apply.
Function Documentation
Applies the function to the args in the environment.
- Parameters
-
fn sexpression representing the function. Can be non-atomic args list of arguments env list of pairs symbol - value eval_args true if the arguments should be evaluated. They should not be evaluated only when apllying a macro
- Returns
- cell* the result of the function applied to the arguments
Associates one symbol to one values in the environment.
- Parameters
-
symbol the symbol to be associated env the environment where the value of the symbol is contained
- Returns
- cell* the value of the symbol in the environment
Evaluates one sexpression and returns the result.
- Parameters
-
expression the sexpression to be evaluated env list of pairs symbol - value
- Returns
- cell* the expression evaluated in the environment
Evaluates the cond-special form.
- Parameters
-
args the list of the arguments: if the caar valuates to non-nill value the the value of the cond will be the evaluated cadar env list of pairs symbol - value
- Returns
- cell* result of the cond
Evaluates the cars of the list in the environment. It's called when a lambda is evaluated: first the list of the arguments of the lambda will be evaluated with this function.
- Parameters
-
args the list of the arguments env the environment
- Returns
- cell* the list containing the valued cars
Creates a new list of pairs symbol-values starting from another. It's used to extend one environment.
- Parameters
-
symbols_list list containing the symbols values_list list containing the values. the order Matters: the first will be matched with the first symbol the second with the second symbol and so on env the environment to be extended
- Returns
- cell* the new environment