should allow empty arrays

*Per Bothner* 13 Nov 2001 17:43 UTC

> The lower bound b and the upper bound e of a dimension are exact
integers with |(<= b e)|.
This should be (<= b (- e 1)) if you believe in APL, which has "always"
allowed
0-element arrays. So does Common Lisp. I think we should too,
If you allow 0 in a dimension it may be more convenient to represent a
shape as:
(list of length), (list of lower-bound)
instead of: list of (lower-bound, upper-bound)
use: (list of length), (list of lower-bound)
I.e. instead of the shape being (0 2 0 3) it would be ((0 0) (3 4)).
One option for the shape function would be:
(shape lower-bound length ...)
where lower-bound is either a list or an integer. The latter is
short-hand for a list where all lower bounds are the same.
One main advantage of this is that you normally don't
need explicit calls to list: (shape 0 3 4) yields ((0 0) (3 4)).
--Per Bothner