summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index a1dd429e..28e58240 100644
--- a/lib.c
+++ b/lib.c
@@ -1153,7 +1153,9 @@ static val rem_lazy_rec(val obj, val list, val env, val func);
static val rem_lazy_func(val env, val lcons)
{
cons_bind (pred, list, env);
- return cdr(rplacd(lcons, rem_lazy_rec(pred, list, env, lcons_fun(lcons))));
+ val rest = rem_lazy_rec(pred, list, env, lcons_fun(lcons));
+ rplacd(lcons, rem_lazy_rec(pred, list, env, lcons_fun(lcons)));
+ return rest;
}
static val rem_lazy_rec(val pred, val list, val env, val func)