Skip to content

Instantly share code, notes, and snippets.

@Mouq
Last active August 29, 2015 14:22
sub Pm's-Q2 (@a) {
my @indices := (^(2*@a)).map: {
$_ %% 2 , ($_/2).floor
}
@indices.map: -> [Bool $switch, Int $index] {
$switch ?? $index !! @a[$index, $index]
}
}
say Pm's-Q2(my @ = "a"..* )[^100].perl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment