Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,8 @@
|
|||
define average(a::array) => {
|
||||
not #a->size ? return 0
|
||||
local(x = 0.0)
|
||||
with i in #a do => { #x += #i }
|
||||
return #x / #a->size
|
||||
}
|
||||
|
||||
average(array(1,2,5,17,7.4)) //6.48
|
||||
Loading…
Add table
Add a link
Reference in a new issue