1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-22 12:30:32 +02:00

(append-map, append-map!): Rewrite as simple "concatenate map" forms,

for tail recursiveness.
This commit is contained in:
Kevin Ryde 2004-12-04 23:16:52 +00:00
parent bbd1b480f4
commit 8b981efda4

View file

@ -525,10 +525,10 @@
(define map1 map) (define map1 map)
(define (append-map f clist1 . rest) (define (append-map f clist1 . rest)
(apply append (apply map f clist1 rest))) (concatenate (apply map f clist1 rest)))
(define (append-map! f clist1 . rest) (define (append-map! f clist1 . rest)
(apply append! (apply map f clist1 rest))) (concatenate! (apply map f clist1 rest)))
;; OPTIMIZE-ME: Re-use cons cells of list1 ;; OPTIMIZE-ME: Re-use cons cells of list1
(define map! map) (define map! map)