Roman Numerals in Perl 6
perl6-slang-roman lets you write your Perl 6 code using Roman numerals:
use Slang::Roman
sub conjunctivus( Int $a, Int $b ) { $a + $b }
say conjunctivus( 0rIV, 0rVI );
# 10
And by the way, yes, it's fully Unicode compliant, so you can even write your numbers with \c[ROMAN NUMERAL ONE HUNDRED THOUSAND]. There's apparently a method of adding overbars to your Roman numerals that extends their range into the millions and beyond, but I think that I probably should leave well enough alone.
Leave a comment