Letter frequency: Difference between revisions

Added Arturo implementation
(→‎Applescript Functional: Two versions :: 1. minimal new code 2. minimal run-time)
(Added Arturo implementation)
Line 1,314:
q -> 2533
z -> 1906</pre>
 
=={{header|Arturo}}==
 
<lang rebol>source: {
The Red Death had long devastated the country.
No pestilence had ever been so fatal, or so hideous.
Blood was its Avator and its seal—the redness and the horror of blood.
There were sharp pains, and sudden dizziness,
and then profuse bleeding at the pores, with dissolution.
The scarlet stains upon the body and especially upon the face of the victim,
were the pest ban which shut him out from the aid and from the sympathy of his fellow-men.
And the whole seizure, progress and termination of the disease,
were the incidents of half an hour.
}
 
valid: as.agnostic [a b c d e f g h i j k l m n o p q r s t u v w x y z]
frequencies: #[]
 
loop split lower source 'ch [
if in? to :literal ch valid [
if not? key? frequencies ch ->
set frequencies ch 0
 
set frequencies ch (get frequencies ch)+1
]
]
 
inspect.muted frequencies</lang>
 
{{out}}
 
<pre>[ :dictionary
t : 39 :integer
h : 33 :integer
e : 60 :integer
r : 24 :integer
d : 27 :integer
a : 33 :integer
l : 15 :integer
o : 34 :integer
n : 30 :integer
g : 3 :integer
v : 4 :integer
s : 34 :integer
c : 8 :integer
u : 11 :integer
y : 5 :integer
p : 11 :integer
i : 25 :integer
b : 6 :integer
f : 12 :integer
w : 8 :integer
z : 3 :integer
m : 7 :integer
]</pre>
 
=={{header|AutoHotkey}}==
1,532

edits