Jump to content

Letter frequency: Difference between revisions

m
→‎{{header|Raku}}: respond to some over excited exposition
(Frink)
m (→‎{{header|Raku}}: respond to some over excited exposition)
Line 5,687:
=={{header|Raku}}==
(formerly Perl 6)
 
In Raku, whenever you want to count things in a collection, the rule of thumb is to use the Bag structure.
 
<div style="background:#ffffee;padding:1em;">
''In response to some of the breathless exposition in the [[Letter_frequency#Frink|Frink]] entry.''
 
* Has a Unicode-aware function, which intelligently enumerates through what a human would consider to be a single visible character. - Raku doesn't have '''a''' special Unicode aware string processing function, rather '''all''' of Rakus text/string wrangling functions are Unicode aware by default.
 
* Unicode-aware lowercase function. - See above: lowercase, uppercase, fold-case, title-case, all Unicode aware by default.
 
* Uses full Unicode tables to determine what is a "letter." - Um... Yeah, Unicode aware by default.
 
* Works with high Unicode characters, that is above \uFFFF. - OK, now we're just repeating ourselves.
 
* Normalize Unicode characters with its normalizeUnicode function. - Raku; normalized by default.
 
* Implements all of (NFC, NFD, NFKC, NFKD). NFC is the default. - Yep.
 
"How many other languages in this page do all or any of this correctly?" Quite a few I suspect. Some even moreso than Frink.
</div>
 
<lang perl6>.&ws.say for slurp.comb.Bag.sort: -*.value;
 
10,333

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.