Family Day update

This commit is contained in:
Ingy döt Net 2020-02-17 23:21:07 -08:00
parent aac6731f2c
commit 9ad63ea473
2442 changed files with 39761 additions and 8255 deletions

View file

@ -1,15 +1,28 @@
doc{
========
Function: foo
========
# Determine The Average Word Name Length
Stack
----
a1 a2 - b
To determine the average length of a word name two values
are needed. First, the total length of all names in the
Dictionary:
Usage
-----
Adds a1 to a2 returning b.
}doc
~~~
#0 [ d:name s:length + ] d:for-each
~~~
: foo ( aa-b ) + ;
And then the number of words in the Dictionary:
~~~
#0 [ drop n:inc ] d:for-each
~~~
With these, a simple division is all that's left.
~~~
/
~~~
Finally, display the results:
~~~
'Average_name_length:_%n\n s:format s:put
~~~