mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 05:50:26 +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
|
@ -1,3 +1,8 @@
|
|||
2001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
|
||||
|
||||
* srfi-1.scm (list-tabulate): Do not go into infinite loop for
|
||||
invalid arguments.
|
||||
|
||||
2001-07-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
|
||||
|
||||
* srfi-1.scm: Replaced calls to `map' in several procedures to
|
||||
|
|
|
@ -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