mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-20 14:19:18 +02:00
map handles mismatched list lengths when the first list isn't the shortest
This commit is contained in:
parent
b84dba8425
commit
a4bd018480
1 changed files with 1 additions and 1 deletions
|
@ -76,7 +76,7 @@
|
|||
(map1 proc (cdr ls) (cons (proc (car ls)) res))
|
||||
(reverse res)))
|
||||
(define (mapn proc lol res)
|
||||
(if (pair? (car lol))
|
||||
(if (every pair? lol)
|
||||
(mapn proc
|
||||
(map1 cdr lol '())
|
||||
(cons (apply1 proc (map1 car lol '())) res))
|
||||
|
|
Loading…
Add table
Reference in a new issue