

                                                                 scan-range

    FUNCTION
SCAN-RANGE &key (:START 0) (:BY 1) (:TYPE 'NUMBER)               [Function]
                :UPTO :BELOW :DOWNTO :ABOVE :LENGTH

    Package
    series

    DESCRIPTION

The function SCAN-RANGE returns a series of numbers starting with the
:START argument (default integer 0) and counting up by the :BY argument
(default integer 1).  The :TYPE argument (default NUMBER) is a type
specifier indicating the type of numbers in the series produced.  The :TYPE
argument must be a (not necessarily proper) subtype of NUMBER.  The :START
and :BY arguments must be of that type.

One of the last five arguments may be used to specify the kind of end test
to be used; these are called TERMINATION ARGUMENTS.  If :UPTO is specified,
counting continues only so long as the numbers generated are less than or
equal to :UPTO.  If :BELOW is specified, counting continues only so long
as the numbers generated are less than :BELOW.  If :DOWNTO is specified,
counting continues only so long as the numbers generated are greater than
or equal to :DOWNTO.  If :ABOVE is specified, counting continues only so
long as the numbers generated are greater than :ABOVE.  If :LENGTH is
specified, it must be a non-negative integer and the output series has this
length.

If none of the termination arguments are specified, the output has
unbounded length.  If more than one termination argument is specified, it
is an error.

(SCAN-RANGE :UPTO 4) => #Z(0 1 2 3 4) 
(SCAN-RANGE :FROM 1 :BY -1 :ABOVE -4) => #Z(1 0 -1 -2 -3) 
(SCAN-RANGE :FROM .5 :BY .1 :TYPE 'FLOAT) => #Z(.5 .6 .7 ...) 
(SCAN-RANGE) => #Z(0 1 2 3 4 5 6 ...)


     SEE ALSO
     about-series
     about-generators

;Copyright 1989 by the Massachusetts Institute of Technology,
;Cambridge, Massachusetts.

;Permission to use, copy, modify, and distribute this software and its
;documentation for any purpose and without fee is hereby granted,
;provided that this copyright and permission notice appear in all
;copies and supporting documentation, and that the name of M.I.T. not
;be used in advertising or publicity pertaining to distribution of the
;software without specific, written prior permission. M.I.T. makes no
;representations about the suitability of this software for any
;purpose.  It is provided "as is" without express or implied warranty.

;    M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
;    ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
;    M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
;    ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
;    WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
;    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
;    SOFTWARE.



