summaryrefslogtreecommitdiffstats
path: root/arraymap.txi
diff options
context:
space:
mode:
Diffstat (limited to 'arraymap.txi')
-rw-r--r--arraymap.txi16
1 files changed, 16 insertions, 0 deletions
diff --git a/arraymap.txi b/arraymap.txi
index 2547eaf..ce082a6 100644
--- a/arraymap.txi
+++ b/arraymap.txi
@@ -41,6 +41,22 @@ Returns an array of lists of indexes for @var{array} such that, if
@end defun
+@defun array-index-for-each array proc
+
+applies @var{proc} to the indices of each element of @var{array} in
+turn. The value returned and the order of application are
+unspecified.
+
+One can implement @var{array-index-map!} as
+@example
+(define (array-index-map! ra fun)
+ (array-index-for-each
+ ra
+ (lambda is (apply array-set! ra (apply fun is) is))))
+@end example
+@end defun
+
+
@deffn {Procedure} array-index-map! array proc
applies @var{proc} to the indices of each element of @var{array} in