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:
parent
7beabedb0a
commit
018adcae03
2 changed files with 6 additions and 1 deletions
|
@ -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)))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue