1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-16 00:30:21 +02:00

* srfi-1.scm (list-tabulate): Do not go into infinite loop for

invalid arguments.
This commit is contained in:
Martin Grabmüller 2001-07-03 15:35:08 +00:00
parent 7beabedb0a
commit 018adcae03
2 changed files with 6 additions and 1 deletions

View file

@ -242,7 +242,7 @@
(define (list-tabulate n init-proc)
(let lp ((n n) (acc '()))
(if (zero? n)
(if (<= n 0)
acc
(lp (- n 1) (cons (init-proc (- n 1)) acc)))))