diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-11-13 20:45:10 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-11-13 20:45:10 -0800 |
commit | 8e2aef8f2b466b37753ba0acd4bd668ff54b3669 (patch) | |
tree | 54380c2dc9a0565f9fdc25349a68552094d1e785 /eval.h | |
parent | 156004248adbb220505567309dfb1fc22f7ab5e4 (diff) | |
download | txr-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.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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); |