aboutsummaryrefslogtreecommitdiffstats
path: root/subarray.scm
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:06:40 -0800
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:06:40 -0800
commita69c9fb665459e2bfdbda1bf80741a0af31a7faf (patch)
treef0bc974f8805049e6b9a4e6864886298fbaa05a4 /subarray.scm
parent4684239efa63dc1b2c1cbe37ef7d3062029f5532 (diff)
downloadslib-upstream.tar.gz
slib-upstream.zip
New upstream version 3b5upstream/3b5upstream
Diffstat (limited to 'subarray.scm')
-rwxr-xr-x[-rw-r--r--]subarray.scm12
1 files changed, 7 insertions, 5 deletions
diff --git a/subarray.scm b/subarray.scm
index 9f84583..949a7a4 100644..100755
--- a/subarray.scm
+++ b/subarray.scm
@@ -18,14 +18,15 @@
;each case.
(require 'array)
+(require 'multiarg-apply)
;;@code{(require 'subarray)}
;;@ftindex subarray
-;;@body
-;;selects a subset of an array. For @1 of rank n, there must be at least
-;;n @2 arguments. For 0 <= @i{j} < n, @2@i{j} is either an integer, a
-;;list of two integers within the range for the @i{j}th index, or #f.
+;;@args array select @dots{}
+;;selects a subset of an array. For 0 <= @i{j} < n, @2@i{j} is either
+;;an integer, a list of two integers within the range for the @i{j}th
+;;index, or #f.
;;
;;When @2@i{j} is a list of two integers, then the @i{j}th index is
;;restricted to that subrange in the returned array.
@@ -63,7 +64,8 @@
;;#1A(e d c b a)
;;@end example
(define (subarray array . selects)
- (apply make-shared-array array
+ (apply make-shared-array
+ array
(lambda args
(let loop ((sels selects)
(args args)