From 2ece7d3266cfea5647821bf1c3e6e3c1841bade9 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Fri, 15 Feb 2019 16:53:18 -0700 Subject: [PATCH] runtime/list: Fix append. --- src/runtime/list.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/runtime/list.scm b/src/runtime/list.scm index 384c5f133..2a2f747ab 100644 --- a/src/runtime/list.scm +++ b/src/runtime/list.scm @@ -562,9 +562,9 @@ USA. (named-lambda (append self . lists) self (let recur ((lists lists)) - (if (pair? lists) ; Recursion limited by number of args. - (%append-2 (car lists) (recur (cdr lists))) - '()))) + (if (null? (cdr lists)) ; Recursion limited by number of args. + (car lists) + (%append-2 (car lists) (recur (cdr lists)))))) (lambda () '()) (lambda (l) l) %append-2)) -- 2.25.1