add array-map and array-for-each
This commit is contained in:
parent
318475c14b
commit
632529c9a5
|
@ -81,6 +81,12 @@
|
||||||
(define (array . objs)
|
(define (array . objs)
|
||||||
(list->array objs))
|
(list->array objs))
|
||||||
|
|
||||||
|
(define (array-map proc ary)
|
||||||
|
(list->array (map proc (array->list ary))))
|
||||||
|
|
||||||
|
(define (array-for-each proc ary)
|
||||||
|
(for-each proc (array->list ary)))
|
||||||
|
|
||||||
(export make-array
|
(export make-array
|
||||||
array
|
array
|
||||||
array?
|
array?
|
||||||
|
@ -91,5 +97,7 @@
|
||||||
array-pop!
|
array-pop!
|
||||||
array-shift!
|
array-shift!
|
||||||
array-unshift!
|
array-unshift!
|
||||||
|
array-map
|
||||||
|
array-for-each
|
||||||
array->list
|
array->list
|
||||||
list->array))
|
list->array))
|
||||||
|
|
Loading…
Reference in New Issue