Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add `array-for-each`.

  • Loading branch information...
commit f986c240baf45c3ceb02655786dc4b062ff72025 1 parent c91b45d
@samth samth authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 main.rkt
View
6 main.rkt
@@ -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))
Please sign in to comment.
Something went wrong with that request. Please try again.