Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
28
Task/Documentation/Retro/documentation.retro
Normal file
28
Task/Documentation/Retro/documentation.retro
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# Determine The Average Word Name Length
|
||||
|
||||
To determine the average length of a word name two values
|
||||
are needed. First, the total length of all names in the
|
||||
Dictionary:
|
||||
|
||||
~~~
|
||||
#0 [ d:name s:length + ] d:for-each
|
||||
~~~
|
||||
|
||||
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
|
||||
~~~
|
||||
Loading…
Add table
Add a link
Reference in a new issue