Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
5
Task/Nth/Perl-6/nth-1.pl6
Normal file
5
Task/Nth/Perl-6/nth-1.pl6
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
my %irregulars = <1 st 2 nd 3 rd>, (11..13 X=> 'th');
|
||||
|
||||
sub nth ($n) { $n ~ ( %irregulars{$n % 100} // %irregulars{$n % 10} // 'th' ) }
|
||||
|
||||
say .list».&nth for [^26], [250..265], [1000..1025];
|
||||
5
Task/Nth/Perl-6/nth-2.pl6
Normal file
5
Task/Nth/Perl-6/nth-2.pl6
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
my %irregulars = <1 ˢᵗ 2 ⁿᵈ 3 ʳᵈ>, (11..13 X=> 'ᵗʰ');
|
||||
|
||||
sub nth ($n) { $n ~ ( %irregulars{$n % 100} // %irregulars{$n % 10} // 'ᵗʰ' ) }
|
||||
|
||||
say .list».&nth for [^26], [250..265], [1000..1025];
|
||||
Loading…
Add table
Add a link
Reference in a new issue