use regular old append when possible

This commit is contained in:
Robby Findler 2019-06-05 12:43:22 -05:00
parent c8e9083f0e
commit a51231ffa2

View File

@ -219,10 +219,7 @@
(define (fast-append l1 l2) (define (fast-append l1 l2)
(if (null? l2) (if (null? l2)
l1 l1
(let fast-append ((l1 l1)) (append l1 l2)))
(if (null? l1)
l2
(cons (car l1) (fast-append (cdr l1)))))))
;; Assuming that merging is symmetric, ie old-can-merge? iff new-can-merge? ;; Assuming that merging is symmetric, ie old-can-merge? iff new-can-merge?
;; This is true of the current c-c implementation, but if it ever changes ;; This is true of the current c-c implementation, but if it ever changes