

                                                optimizable-series-function

    Declaration SPECIFIER
OPTIMIZABLE-SERIES-FUNCTION                         [Declaration specifier]

    Package
    series

    DESCRIPTION

The declaration specifier (OPTIMIZABLE-SERIES-FUNCTION INTEGER) indicates
that the function being defined is a series function that needs to be
analyzed so that it can be optimized when it appears in series expressions.
(A warning is issued if the function being defined neither takes a series
as input nor produces a series as output.)  INTEGER (default 1) specifies
the number of values returned by the function being defined.  (This cannot
necessarily be determined by local analysis.)  The only place
OPTIMIZABLE-SERIES-FUNCTION is allowed to appear is in a declaration
immediately inside a DEFUN.  As an example, the following shows how a
simplified version of COLLECT-SUM could be defined.

(DEFUN SIMPLE-COLLECT-SUM (NUMBERS) 
  (DECLARE (OPTIMIZABLE-SERIES-FUNCTION 1)) 
  (COLLECT-FN 'NUMBER #'(LAMBDA () 0) #'+ NUMBERS))


     SEE ALSO
     about-series
     about-generators
     about-series-optimization

;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.



