Count how many vowels and consonants occur in a string: Difference between revisions
Count how many vowels and consonants occur in a string (view source)
Revision as of 06:33, 12 September 2021
, 2 years ago→{{header|Haskell}}
Line 237:
then t
else f</lang>
{{Out}}
<pre>Unique vowels and consonants used, with counts:
Line 291 ⟶ 292:
('\t' :)
( [ show vTotal
<> "
<> show (length v)
<> " vowels:"
Line 297 ⟶ 298:
<> (('\t' :) . show <$> v)
<> [ "",
show cTotal <> "
<> show (length c)
<> " consonants:"
Line 309 ⟶ 310:
both = join bimap</lang>
{{Out}}
<pre>33
12 characters drawn from 5 vowels:
('a', 4)
('e', 3)
('i', 1)
('o', 3)
('u', 1)</pre>
▲ ('F',2)
▲ ('g',4)
▲ ('l',1)
▲ ('n',3)
▲ ('p',1)
=={{header|jq}}==
|