|
|
|
|
|
by lizmat
1461 days ago
|
|
Cool, but I couldn't resist rakufying your "deflate" subroutine: sub deflate($power is copy, $rate, $years) {
$power *= 1 + $rate for ^$years;
$power * 100
}
sub MAIN(:$rate = 0.0225, :$years = 10)
{
print qq:to/EOF/;
After $years years of deflation at a rate of {$rate * 100}% per year,
purchasing power is &deflate(1,$rate,$years)% of what it was initially.
EOF
}
Which I think reads quite a bit better :-) |
|
The innumerable dark-seeming corners of the language is part of what makes Raku so very, distinctly “Perl”. Little traits and single character sigils that change everything. I find the black magic of Perl моѕt all∪ring ∮.