Permalink
Browse files

Add `array-for-each`.

  • Loading branch information...
1 parent c91b45d commit f986c240baf45c3ceb02655786dc4b062ff72025 @samth samth committed Feb 27, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 main.rkt
View
@@ -5,9 +5,10 @@
(provide (rename-out [array* array])
build-array
array-ref array-set
+ array-for-each
array-length array->list)
-;; TODO: array-for-each, array-map, array-foldl, array-foldr
+;; TODO: array-map, array-foldl, array-foldr
;; TODO: array, list->array
;; (data a)
@@ -76,3 +77,6 @@
(define (array->list t)
(impure vector->list t))
+
+(define (array-for-each f t)
+ (impure (lambda (d) (vector-for-each d f)) t))

0 comments on commit f986c24

Please sign in to comment.