Append-map: handle multiple list.

* module/srfi/srfi-1.mes (append-map): Add optional rest argument.
This commit is contained in:
Jan Nieuwenhuizen 2017-01-04 11:20:29 +01:00
parent 2ae1eec0eb
commit 921c2fe79e

View file

@ -37,8 +37,8 @@
(cons (car lst) (loop (cdr lst)))
(loop (cdr lst))))))
(define (append-map f lst)
(apply append (map f lst)))
(define (append-map f lst . rest)
(apply append (apply map f (cons lst rest))))
(define (filter-map f lst)
(if (null? lst) (list)