summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-05-03 20:09:25 -0700
committerKaz Kylheku <kaz@kylheku.com>2020-05-03 20:09:25 -0700
commitd7e61d9fd142b867388f930907a099e7b132e76a (patch)
treeaf3402c988649e7183af88e357676686b759ff6a /eval.c
parent799f765f3f1fe18901636c124f1ae62df46f93a8 (diff)
downloadtxr-d7e61d9fd142b867388f930907a099e7b132e76a.tar.gz
txr-d7e61d9fd142b867388f930907a099e7b132e76a.tar.bz2
txr-d7e61d9fd142b867388f930907a099e7b132e76a.zip
symbol-function: bugfix: expand lambda expression.
* eval.c (lookup_fun): A lambda expression must be expanded before being turned into a function. * txr.1: Documented.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 7b3a765d..3eea86bc 100644
--- a/eval.c
+++ b/eval.c
@@ -579,7 +579,7 @@ val lookup_fun(val env, val sym)
} else if (car(sym) == macro_s) {
return lookup_mac(nil, cadr(sym));
} else if (car(sym) == lambda_s) {
- return cons(sym, func_interp(env, sym));
+ return cons(sym, func_interp(env, expand(sym, nil)));
} else {
return nil;
}