Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions challenge-091/stuart-little/raku/ch-1.p6
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env perl6
use v6;

# run as <script> <number>

say @*ARGS[0].comb(/(\d)$0*/).map(*.comb).map({ $_.elems, $_[0] }).flat
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like it :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much! :)

12 changes: 12 additions & 0 deletions challenge-091/stuart-little/raku/ch-2.p6
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env perl6
use v6;

# run as <script> <space-separated array>

sub jumpp(@a where *.all >= 0) {
@a[0] >= @a.elems-1 && return True;
@a[0] == 0 && return False;
return jumpp(@a[@a[0]..*]);
}

say @*ARGS.&jumpp.Int