From 9f986ceb512c1e9ac0494c546e2618199396f82f Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 18 Feb 2014 07:19:11 -0800 Subject: * combi.c (rperm_gen_full): Update ptail with return value of list_collect. This is not necessary for correctness, but it spares list_collect from having to search for the tail on each call. --- ChangeLog | 6 ++++++ combi.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b84f5cbf..2b1d4886 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2014-02-18 Kaz Kylheku + + * combi.c (rperm_gen_full): Update ptail with return value + of list_collect. This is not necessary for correctness, but it spares + list_collect from having to search for the tail on each call. + 2014-02-17 Kaz Kylheku Version 80 diff --git a/combi.c b/combi.c index e32957a4..68664b5c 100644 --- a/combi.c +++ b/combi.c @@ -244,7 +244,7 @@ static val rperm_gen_fun(val env) cnum len = c_num(length_vec(vec)); for (i = 0; i < len; i++) - list_collect(ptail, car(vec->v.vec[i])); + ptail = list_collect(ptail, car(vec->v.vec[i])); for (i = len-1; i >= 0; i--) { pop(&vec->v.vec[i]); -- cgit v1.2.3