Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,9 @@
|
|||
: avg \ a -- avg(a)
|
||||
dup ' n:+ 0 a:reduce
|
||||
swap a:len nip n:/ ;
|
||||
|
||||
\ test:
|
||||
[ 1.0, 2.3, 1.1, 5.0, 3, 2.8, 2.01, 3.14159 ] avg . cr
|
||||
[ ] avg . cr
|
||||
[ 10 ] avg . cr
|
||||
bye
|
||||
Loading…
Add table
Add a link
Reference in a new issue