Data update
This commit is contained in:
parent
8e4e15fa56
commit
72eb4943cb
1853 changed files with 35514 additions and 9441 deletions
|
|
@ -1,4 +1,4 @@
|
|||
val umean = fn x:fold(fn{+}, x) / len(x)
|
||||
val umean = fn x:fold(x, by=fn{+}) / len(x)
|
||||
|
||||
writeln " custom: ", umean([7, 3, 12])
|
||||
writeln "built-in: ", mean([7, 3, 12])
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
let mean = fn(l) {
|
||||
var tot = 0
|
||||
for i in l.iter() {
|
||||
tot := tot + i
|
||||
}
|
||||
return tot/l.len()
|
||||
}
|
||||
print(mean([10, 30, 50, 5, 5]))
|
||||
Loading…
Add table
Add a link
Reference in a new issue