6 lines
145 B
Text
6 lines
145 B
Text
function mean(sequence s)
|
|
if length(s)=0 then return 0 end if
|
|
return sum(s)/length(s)
|
|
end function
|
|
|
|
? mean({1, 2, 5, -5, -9.5, 3.14159})
|