Number names: Difference between revisions
m
Fix Perl6 -> Raku links and comments
Thundergnat (talk | contribs) (Rename Perl 6 -> Raku, alphabetize, minor clean-up) |
Thundergnat (talk | contribs) m (Fix Perl6 -> Raku links and comments) |
||
Line 5,018:
=={{header|Raku}}==
(formerly Perl 6)
Apart from the <tt>$m++</tt> this can be viewed as a purely functional program; we use nested <tt>gather</tt>/<tt>take</tt> constructs to avoid accumulators.
<lang perl6>constant @I = <zero one two three four five six seven eight nine
Line 5,067 ⟶ 5,068:
one hundred ninety eight trillion, seven hundred twenty three billion, four hundred eighty three million, seventeen thousand, four hundred seventeen</pre>
Alternately, we could use the [https://modules.raku.org/search/?q=Lingua%3A%3AEN%3A%3ANumbers Lingua::EN::Numbers module from the
<lang perl6>use Lingua::EN::Numbers; # Version 2.4.0 or higher
|