Function frequency: Difference between revisions
Content added Content deleted
(Explained intent) |
(Added symbol and number frequencies) |
||
Line 104: | Line 104: | ||
cadr 80 |
cadr 80 |
||
or 76</pre> |
or 76</pre> |
||
If the condition in the 5th line (getd X) is replaced with (sym? X), then all symbols are counted, and the output is |
|||
<pre>X 566 |
|||
quote 310 |
|||
car 236 |
|||
cdr 181 |
|||
C 160 |
|||
N 157 |
|||
L 155 |
|||
Lst 152 |
|||
setq 148 |
|||
T 144</pre> |
|||
And if it is replaced with (num? X), it is |
|||
<pre>1 71 |
|||
0 38 |
|||
2 27 |
|||
3 17 |
|||
7 9 |
|||
-1 9 |
|||
100 8 |
|||
48 6 |
|||
43 6 |
|||
12 6</pre> |
|||
=={{header|Tcl}}== |
=={{header|Tcl}}== |