summaryrefslogtreecommitdiffstats
path: root/eval.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-11-13 20:45:10 -0800
committerKaz Kylheku <kaz@kylheku.com>2018-11-13 20:45:10 -0800
commit8e2aef8f2b466b37753ba0acd4bd668ff54b3669 (patch)
tree54380c2dc9a0565f9fdc25349a68552094d1e785 /eval.h
parent156004248adbb220505567309dfb1fc22f7ab5e4 (diff)
downloadtxr-8e2aef8f2b466b37753ba0acd4bd668ff54b3669.tar.gz
txr-8e2aef8f2b466b37753ba0acd4bd668ff54b3669.tar.bz2
txr-8e2aef8f2b466b37753ba0acd4bd668ff54b3669.zip
copy-fun: duplicate a function, with own environment.
* eval.c (deep_copy_env): New function. (eval_init): Register copy-fun intrinsic. * eval.h (deep_copy_env): Declared. * lib.c (copy_fun): New function. * lib.h (copy_fun): Declared. * vm.c (vm_copy_closure): New function. * vm.h (vm_copy_closure): Declared. * txr.1: Documented copy-fun.
Diffstat (limited to 'eval.h')
-rw-r--r--eval.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/eval.h b/eval.h
index 6a69714d..d85d9fb6 100644
--- a/eval.h
+++ b/eval.h
@@ -44,6 +44,7 @@ val set_last_form_evaled(val form);
void error_trace(val exsym, val exvals, val out_stream, val prefix);
val make_env(val fbindings, val vbindings, val up_env);
val copy_env(val oenv);
+val deep_copy_env(val oenv);
val env_fbind(val env, val sym, val fun);
val env_vbind(val env, val sym, val obj);
val lookup_var(val env, val sym);