From: Matt Birkholz Date: Fri, 15 Feb 2019 23:53:18 +0000 (-0700) Subject: runtime/list: Fix append. X-Git-Tag: mit-scheme-pucked-10.1.10~5 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=2ece7d3266cfea5647821bf1c3e6e3c1841bade9;p=mit-scheme.git runtime/list: Fix append. --- 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))