Function frequency: Difference between revisions

Content added Content deleted
(Add Factor example)
m (→‎{{header|Factor}}: change some wording)
Line 693: Line 693:


=={{header|Factor}}==
=={{header|Factor}}==
Let's take a look at the <code>sequences</code> vocabulary/source file from Factor's standard library. Caveats: this approach does not count word-defining words such as <code>:</code> and <code>M:</code>, nor does it count words like <code>{</code> and <code>[</code>. Arguably, this is preferable behavior.
Let's take a look at the <code>sequences</code> vocabulary/source file from Factor's standard library. This approach does not count word-defining words such as <code>:</code> and <code>M:</code>, nor does it count words like <code>{</code> and <code>[</code>.
<lang factor>USING: accessors kernel math.statistics prettyprint sequences
<lang factor>USING: accessors kernel math.statistics prettyprint sequences
sequences.deep source-files vocabs words ;
sequences.deep source-files vocabs words ;