mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-21 06:39:17 +02:00
fixing the default start in iota
This commit is contained in:
parent
372aabb636
commit
bd1e861afa
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@
|
||||||
res))
|
res))
|
||||||
|
|
||||||
(define (iota count . o)
|
(define (iota count . o)
|
||||||
(let ((start (if (pair? o) (car o) count))
|
(let ((start (if (pair? o) (car o) 0))
|
||||||
(step (if (and (pair? o) (pair? (cdr o))) (cadr o) 1)))
|
(step (if (and (pair? o) (pair? (cdr o))) (cadr o) 1)))
|
||||||
(let lp ((i count) (n (+ start (* (- count 1) step))) (res '()))
|
(let lp ((i count) (n (+ start (* (- count 1) step))) (res '()))
|
||||||
(if (<= i 0)
|
(if (<= i 0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue