Skip to content

Commit

Permalink
Challenge 63 Solutions
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Anderson committed Jun 6, 2020
1 parent 780cd70 commit d4ab722
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion challenge-063/mark-anderson/raku/ch-1.raku
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ say last_word(join(' ', 1..1e6), rx/^(3.*?)**3/);

sub last_word(Str $string, Regex $regexp) {

return $string.split(/\s+/).grep($regexp).Array.pop || Nil;
return $string.words.grep($regexp).Array.pop || Nil;

}
1 change: 0 additions & 1 deletion challenge-063/mark-anderson/raku/ch-2.raku
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ sub MAIN(Str $str = "xyxx") {
my @arr = $str.comb;

for 1 .. Inf -> $i {
next if $i %% $str.chars;
@arr .= rotate($i % $str.chars);
say $i and last if @arr.join eq $str;
}
Expand Down

0 comments on commit d4ab722

Please sign in to comment.