On Sat, 16 Sep 2017 22:29:57 -0700, sml...@gmail.com wrote:
> When calling `.skip` on a list which contains a `Slip` at the start, the 
> resulting `Seq` behaves in some cases as if *all* elements from that 
> `Slip` were skipped (instead of just the first one):
> 
>      say (<a b c>, <d e>).map(|*).skip.perl;        # ("d", "e").Seq
>      say (<a b c>, <d e>).map(|*).skip.eager.perl;  # ("d", "e").Seq
>      say (<a b c>, <d e>).map(|*).skip.eager.gist;  # (d e)
>      say (<a b c>, <d e>).map(|*).skip.eager.join;  # de
>      say (<a b c>, <d e>).map(|*).skip.cache.perl;  # ("d", "e")
>      say (<a b c>, <d e>).map(|*).skip.cache.join;  # de
>      say (<a b c>, <d e>).map(|*).skip.[*].gist;    # (d e)
> 
> But it depends on how the returned `Seq` is iterated. In the following 
> cases it behaves correctly:
> 
>      say (<a b c>, <d e>).map(|*).skip.gist;               # (b c d e)
>      say (<a b c>, <d e>).map(|*).skip.join;               # bcde
>      say (<a b c>, <d e>).map(|*).skip.cache.gist;         # (b c d e)
>      say (<a b c>, <d e>).map(|*).skip.[0..*].gist;        # (b c d e)
>      say (<a b c>, <d e>).map(|*).skip.iterator.pull-one;  # b
> 
> It looks likeĀ¹ this bug has existed ever since the `.skip` method was 
> implementedĀ² in January 2017.
> 
> ---
> [1] https://gist.github.com/Whateverable/973c1b6cb09af28a2249b4ba33165885
> [2] https://github.com/rakudo/rakudo/commit/8a6bfc6
> 
> ---
> This is Rakudo version 2017.08-156-ge6a695b27 built on MoarVM version 
> 2017.08.1-171-gcf95892e
> implementing Perl 6.c.


Thank you for the report. This is now fixed.

Fix:  https://github.com/rakudo/rakudo/commit/41896b7bbf9fe5a
Test: https://github.com/perl6/roast/commit/2e23965fa1180b732

Reply via email to