Count how many vowels and consonants occur in a string: Difference between revisions

m
Line 237:
then t
else f</lang>
{{Out}}
<pre>Unique vowels and consonants used, with counts:
 
Line 291 ⟶ 292:
('\t' :)
( [ show vTotal
<> " instancescharacters ofdrawn from "
<> show (length v)
<> " vowels:"
Line 297 ⟶ 298:
<> (('\t' :) . show <$> v)
<> [ "",
show cTotal <> " instancescharacters ofdrawn from "
<> show (length c)
<> " consonants:"
Line 309 ⟶ 310:
both = join bimap</lang>
{{Out}}
<pre>33 '"vowels and consonants'"
 
12 characters drawn from 5 vowels:
('ga', 4)
('ne', 3)
('li', 1)
('Fo',2 3)
('pu', 1)
 
1221 instancescharacters ofdrawn 5from vowels9 consonants:
('a', 4)
('e', 3)
('i', 1)
('o', 3)
('u', 1)</pre>
21 instances of 9 consonants:
('F',2)
('g',4)
('l',1)
('m',2)
('n',3)
('p',1)
('r',6)
('t',1)
('v',1)</pre>
 
=={{header|jq}}==
9,655

edits