Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List.roundrobin does not work as a method on List objects. #1447

Closed
Xliff opened this issue Jan 26, 2018 · 4 comments
Closed

List.roundrobin does not work as a method on List objects. #1447

Xliff opened this issue Jan 26, 2018 · 4 comments

Comments

@Xliff
Copy link
Contributor

Xliff commented Jan 26, 2018

List.roundrobin does not work as a method on List objects. See the following output:

  • Working
    m: say (roundrobin ((1, 2, 3), (4, 5), (6, 7, 8, 9)))
    rakudo-moar 1ee89b5: OUTPUT: «((1 4 6) (2 5 7) (3 8) (9))␤»

  • Not working
    m: ((1, 2, 3), (4, 5), (6, 7, 8, 9)).roundrobin.say
    rakudo-moar 1ee89b5: OUTPUT: «No such method 'roundrobin' for invocant of type 'List'␤ in block at line 1␤␤»

I would expect, the output to be the same for both invocations listed above. As per the docs, roundrobin is listed as a method of List objects.

  • Operating system:

This has been tested under a 32-bit Linux VM, and reproduced on camelia in the #perl6 IRC channel.

  • Compiler version (perl6 -v):
This is Rakudo version 2017.10-4-g4fca94743 built on MoarVM version 2017.10
implementing Perl 6.c.
@zoffixznet
Copy link
Contributor

zoffixznet commented Jan 26, 2018

I'm −⅓ on making this a method and would propose the docs to be fixed instead.

Thematically this routine operates on a bunch of lists so making it a method on a list is a bit outside of that, despite the subroutine using +@ slurpy semantics.

@Xliff
Copy link
Contributor Author

Xliff commented Jan 27, 2018

Would a fix on the docs simply involve a change of "method" to "sub"?

@zoffixznet
Copy link
Contributor

Pretty much, plus signature change to sub roundrobin(+list-of-lists) or something along those lines.

@AlexDaniel
Copy link
Contributor

I'm −⅓ on making this a method and would propose the docs to be fixed instead.

I was convinced that we had a .zip method, but turns out that we don't (only for supplies but that's unrelated). So yeah, I'm not sure what is the justification for having it.

-⅔, I think this is rejectable once a ticket for docs is created (or if it's fixed right away).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants