Averages/Simple moving average: Difference between revisions

Updated both D entries
(add julia example)
(Updated both D entries)
Line 730:
int index, nFilled;
 
return (in T v) nothrow @nogc {
sum += -data[index] + v;
data[index] = v;
Line 768:
int index, nFilled;
 
auto opCall(in T v) pure nothrow @nogc {
sum += -data[index] + v;
data[index] = v;