The OpenD Programming Language

cumulativeFold.cumulativeFold

No-seed version. The first element of r is used as the seed's value. For each function f in fun, the corresponding seed type S is Unqual!(typeof(f(e, e))), where e is an element of r: ElementType!R. Once S has been determined, then S s = e; and s = f(s, e); must both be legal.

  1. auto cumulativeFold(R range)
    template cumulativeFold(fun...)
    cumulativeFold
    (
    R
    )
    ()
    if (
    fun.length >= 1
    )
  2. auto cumulativeFold(R range, S seed)

Parameters

range R

Return Value

Type: auto

a range containing the consecutive reduced values.

Meta