Fix chunk-for-each! calling proc when there's nothing to do

This commit is contained in:
Christopher Baines 2022-01-14 15:25:35 +00:00
parent 5ae8b796a7
commit 5a1b6d41eb

View file

@ -195,9 +195,11 @@
(map cdr chunks-and-rest)))
(apply proc lsts)))
(unless (eq? 1
(length (delete-duplicates
(map length lsts))))
(let ((list-lengths (map length lsts)))
(unless (eq? 1 (length (delete-duplicates list-lengths)))
(error "lists not equal length"))
(do-one-iteration lsts))
(unless (eq? 0 (first list-lengths))
(do-one-iteration lsts)))
#t)