Averages/Simple moving average: Difference between revisions

m (→‎{{header|Perl 6}}: Combine into a single file for ease of testing)
Line 1,054:
 
=={{header|Elena}}==
ELENA 3.24 :
<lang elena>import system'routines.
import system'collections.
Line 1,080:
if (aCount > thePeriod)
[
theList remove atremoveAt:0.
aCount := thePeriod
].
var aSum := theList summarize(Real new int:0).
^ aSum / aCount
Line 1,092:
}
 
public program =
[
var SMA3 := SMA new:3.
Anonymous user