Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
#!/usr/bin/env raku
# Task 1 from
# Comments:
unit sub MAIN(Int $n = 1122234);
# Cannot process more than 10 repeating digits.
# Otherwise use some spelling module.
my @spell = <one two three four five six seven eight nine ten>;
put gather for $n ~~ m:g/ (\d) $0* / {
take @spell[.Str.chars - 1];
take .[0];
# Output:
# two 1 three 2 one 3 one 4