Averages/Arithmetic mean: Difference between revisions
Content added Content deleted
Line 547: | Line 547: | ||
#define std'patterns'*. |
#define std'patterns'*. |
||
#define std'dictionary'*. |
#define std'dictionary'*. |
||
// --- Sum --- |
|||
#class MeanAction |
#class MeanAction |
||
Line 582: | Line 580: | ||
theValue += aValue. |
theValue += aValue. |
||
⚫ | |||
⚫ | |||
#method start : aPattern |
|||
[ |
|||
aPattern run:self. |
|||
^ self numeric. |
|||
] |
] |
||
} |
} |
||
// --- Program --- |
|||
#symbol Program => |
#symbol Program => |
||
[ |
[ |
||
⚫ | |||
#var anAction := MeanAction. |
|||
]. |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
'program'Output << anAction numeric. |
|||
⚫ | |||
=={{header|Erlang}}== |
=={{header|Erlang}}== |