add array-map and array-for-each

This commit is contained in:
Yuichi Nishiwaki 2014-07-15 22:45:04 +09:00
parent 318475c14b
commit 632529c9a5
1 changed files with 8 additions and 0 deletions

View File

@ -81,6 +81,12 @@
(define (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
array
array?
@ -91,5 +97,7 @@
array-pop!
array-shift!
array-unshift!
array-map
array-for-each
array->list
list->array))