-
-
Save FROGGS/402a9735c371aa43d157 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/core/array_slice.pm b/src/core/array_slice.pm | |
index db3b4d0..e24ba0c 100644 | |
--- a/src/core/array_slice.pm | |
+++ b/src/core/array_slice.pm | |
@@ -3,7 +3,10 @@ | |
sub POSITIONS (\SELF, \pos) { # handle possible infinite slices | |
my $positions = pos.flat; | |
- if pos ~~ Range || ($positions.gimme(*) && $positions.infinite) { | |
+ if pos ~~ Range { | |
+ $positions.eager.Parcel; | |
+ } | |
+ elsif $positions.gimme(*) && $positions.infinite { | |
my $list = SELF.list; | |
$positions.map( { | |
last if $_ >= $list.gimme( $_ + 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment