Averages/Arithmetic mean: Difference between revisions
Content deleted Content added
→{{header|Ruby}}: use sum method |
Update WDTE example for language overhaul. |
||
Line 3,227:
=={{header|WDTE}}==
<lang WDTE>
let a => import 'arrays';
let mean nums =>
a.stream nums
-> s.reduce [0; 0] (@ s p n => [+ (a.at p 0) 1; + (a.at p 1) n])
Line 3,238:
Usage:
<lang WDTE>
Output:
|