Letter frequency: Difference between revisions

Content added Content deleted
Line 5,575: Line 5,575:
16->u
16->u
16->d
16->d
...</pre>
If you prefer seeing the character first followed by the count, replace the do-loop's action with:
<lang smalltalk>... do:[:assoc | '%s -> %s\n' printf:{assoc value . assoc key} on:Stdout ].</lang>
{{out}}
<pre>e -> 27
n -> 20
u -> 16
d -> 16
...</pre>
...</pre>