PWC #236, Task 2

Run Settings
LanguageRaku
Language Version
Run Command
# URL: https://theweeklychallenge.org/blog/perl-weekly-challenge-236/#TASK2 my @ints = $*IN.words; my %remain is SetHash = |@ints; my @loops; while %remain { my @cache; my $i = %remain.keys.min; repeat { $i = @ints[$i]; @cache.grep($i) ?? last() !! @cache.push($i); } while True; @loops.push(@cache); %remain.unset($_) for @cache; } put +@loops;
Editor Settings
Theme
Key bindings
Full width
Lines