Skip to content

Commit 8b8e831

Browse files
committed
LN_CORE: Make elem in (make-list n elem) optional to fit #srfi-1
1 parent d8cab37 commit 8b8e831

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/ln_core/list.scm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#|
22
LambdaNative - a cross-platform Scheme framework
3-
Copyright (c) 2009-2013, University of British Columbia
3+
Copyright (c) 2009-2020, University of British Columbia
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or
@@ -41,7 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4141
(define (list-notempty? lst) (and (list? lst) (not (null? lst))))
4242

4343
;; Make a list of length n, where each element is set to elem
44-
(define (make-list n elem)
44+
(define (make-list n #!optional (elem 0))
4545
(if (zero? n) '()
4646
(cons elem (make-list (- n 1) elem))))
4747

0 commit comments

Comments
 (0)