repl.txt (571B)
1 2 {{alias}}() 3 Returns an accumulator function which incrementally updates a count, 4 ignoring `NaN` values. 5 6 If provided a value, the accumulator function returns an updated count. If 7 not provided a value, the accumulator function returns the current count. 8 9 Returns 10 ------- 11 acc: Function 12 Accumulator function. 13 14 Examples 15 -------- 16 > var accumulator = {{alias}}(); 17 > var v = accumulator() 18 0 19 > v = accumulator( 2.0 ) 20 1 21 > v = accumulator( -5.0 ) 22 2 23 > v = accumulator() 24 2 25 26 See Also 27 -------- 28