From a69c9fb665459e2bfdbda1bf80741a0af31a7faf Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 20 Feb 2017 00:06:40 -0800 Subject: New upstream version 3b5 --- subarray.scm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) mode change 100644 => 100755 subarray.scm (limited to 'subarray.scm') diff --git a/subarray.scm b/subarray.scm old mode 100644 new mode 100755 index 9f84583..949a7a4 --- 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) -- cgit v1.2.3