diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:38 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:38 -0800 |
commit | 64f037d91e0c9296dcaef9a0ff3eb33b19a2ed34 (patch) | |
tree | 1b23b8e8005328194e2fb4bf653806c85050933f /arraymap.txi | |
parent | 5bea21e81ed516440e34e480f2c33ca41aa8c597 (diff) | |
download | slib-64f037d91e0c9296dcaef9a0ff3eb33b19a2ed34.tar.gz slib-64f037d91e0c9296dcaef9a0ff3eb33b19a2ed34.zip |
Import Upstream version 3a5upstream/3a5
Diffstat (limited to 'arraymap.txi')
-rw-r--r-- | arraymap.txi | 16 |
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 |