> On 17 Sep 2017, at 07:29, Sam S. (via RT) <perl6-bugs-follo...@perl.org> 
> wrote:
> 
> # New Ticket Created by  Sam S. 
> # Please include the string:  [perl #132109]
> # in the subject line of all future correspondence about this issue. 
> # <URL: https://rt.perl.org/Ticket/Display.html?id=132109 >
> 
> 
> 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

I think he problem here is in Seq.cache.  Investigating...

Reply via email to