Letter frequency: Difference between revisions

No edit summary
Line 4,726:
 
=={{header|langur}}==
<syntaxhighlight lang="langur">val .countLetters = ffn(.s) {
for[=h{}] .s2 in split(replace(.s, RE/\P{L}/)) {
_for[.s2; 0] += 1
Line 4,733:
 
val .counts = .countLetters(readfile "./fuzz.txt")
writeln join "\n", map ffn(.k) $"\.k;: \.counts[.k];", keys .counts</syntaxhighlight>
</syntaxhighlight>
 
{{out}}
890

edits