Skip to content

Instantly share code, notes, and snippets.

@FROGGS
Created September 2, 2014 16:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FROGGS/402a9735c371aa43d157 to your computer and use it in GitHub Desktop.
Save FROGGS/402a9735c371aa43d157 to your computer and use it in GitHub Desktop.
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