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. --- combi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'combi.c') 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