Data update
This commit is contained in:
parent
4d5544505c
commit
4924dd0264
3073 changed files with 55820 additions and 4408 deletions
|
|
@ -0,0 +1,2 @@
|
|||
> [(+)/x%ℝ(:x)] ⟨3,1,4,1,5,9⟩
|
||||
3.833333333333333
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
create or replace function average(lst) as (
|
||||
list_sum(lst) / length(lst)
|
||||
);
|
||||
|
|
@ -21,8 +21,8 @@ extension op
|
|||
|
||||
public program()
|
||||
{
|
||||
var array := new int[]{1, 2, 3, 4, 5, 6, 7, 8};
|
||||
console.printLine(
|
||||
"Arithmetic mean of {",array.asEnumerable(),"} is ",
|
||||
array.average()).readChar()
|
||||
var array := new int[]{1, 2, 3, 4, 5, 6, 7, 8};
|
||||
Console.printLine(
|
||||
"Arithmetic mean of {",array.asEnumerable(),"} is ",
|
||||
array.average()).readChar()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
local function arithmetic_mean(a) return a:reduce(|sum, i| -> sum + i) / #a end
|
||||
|
||||
local arrays = { {1, 2, 3, 4, 5}, {} }
|
||||
for arrays as a do print(arithmetic_mean(a)) end
|
||||
Loading…
Add table
Add a link
Reference in a new issue