From cb4b820893b2cc48a70f2a2f0d70863fb191d7aa Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 2 Mar 2014 22:04:16 -0800 Subject: * eval.c (make_env_intrinsic): New static function. (eval_init): Register new intrinsics make-env, env-fbind and env-vbind. * txr.1: Documented. --- txr.1 | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'txr.1') diff --git a/txr.1 b/txr.1 index 853a6988..173d2d41 100644 --- a/txr.1 +++ b/txr.1 @@ -5802,6 +5802,49 @@ resolving the function and variable references encountered in the expression. The object nil can be specified as an environment, in which case the evaluation takes place in the global environment. +See also: the make-env function. + +.SS Function make-env + +.TP +Syntax: + + (make-env [ [ []]]) + +.TP +Description: + +The make-env function creates an environment object suitable as the parameter. + +The and parameters, if specified, +should be association lists, mapping symbols to objects. The objects in + should be functions, or objects callable as functions. + +The argument, if specified, should be an environment. + +Note: bindings can also be added to an environment usign the env-vbind +and env-fbind functions. + +.SS Functions env-vbind and env-fbind + +.TP +Syntax: + + (env-vbind ) + (env-fbind ) + +.TP +Description: + +These functions bind a symbol to a value in either the function or variable space +of environment . + +Values established in the function space should be functions or objects that +can be used as functions such as lists, strings, arrays or hashes. + +If already exists in the environment, in the given space, then its +value is updated with . + .SH MUTATION .SS Operators inc, dec, set, push, pop, flip and del -- cgit v1.2.3