diff options
author | David Thompson <dthompson2@worcester.edu> | 2020-09-29 16:44:34 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2020-09-29 16:44:34 -0400 |
commit | 35f2afb2d4d3adc72d83fbc9582d8dc9bfee0ab0 (patch) | |
tree | 18c59172e8ad51c88929c38ec390a2c6e4796e91 | |
parent | dba391852d761c8f18e723592f351a0d9b375b99 (diff) |
array-list: Allow user-specified initial capacity.
-rw-r--r-- | chickadee/array-list.scm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chickadee/array-list.scm b/chickadee/array-list.scm index 0150cce..e09cded 100644 --- a/chickadee/array-list.scm +++ b/chickadee/array-list.scm @@ -51,8 +51,8 @@ (set-record-type-printer! <array-list> display-array-list) -(define (make-array-list) - (%make-array-list (make-vector 32) 0)) +(define* (make-array-list #:optional (initial-capacity 32)) + (%make-array-list (make-vector initial-capacity) 0)) (define (array-list . items) (let ((l (make-array-list))) |