
{{alias}}( window )
    Returns an accumulator function which incrementally computes a moving sum.

    The `window` parameter defines the number of values over which to compute
    the moving sum.

    If provided a value, the accumulator function returns an updated moving sum.
    If not provided a value, the accumulator function returns the current moving
    sum.

    If provided `NaN` or a value which, when used in computations, results in
    `NaN`, the accumulated value is `NaN` for all future invocations.

    The first `W-1` returned sums will have less statistical support than
    subsequent sums, as `W` values are needed to fill the window buffer. Until
    the window is full, the returned sum equals the sum of all provided values.

    Parameters
    ----------
    window: integer
        Window size.

    Returns
    -------
    acc: Function
        Accumulator function.

    Examples
    --------
    > var accumulator = {{alias}}( 3 );
    > var s = accumulator()
    null
    > s = accumulator( 2.0 )
    2.0
    > s = accumulator( -5.0 )
    -3.0
    > s = accumulator( 3.0 )
    0.0
    > s = accumulator( 5.0 )
    3.0
    > s = accumulator()
    3.0

    See Also
    --------

