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

Whatever do not work as specified with zip operator #864

Closed
p6rt opened this issue Apr 5, 2009 · 6 comments
Closed

Whatever do not work as specified with zip operator #864

p6rt opened this issue Apr 5, 2009 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Apr 5, 2009

Migrated from rt.perl.org#64474 (status was 'resolved')

Searchable as RT64474$

@p6rt
Copy link
Author

p6rt commented Apr 5, 2009

From @ilyabelikin

Hi there,

say (<a b c> Z [1,*]).perl
["a", 1, "b", *] # wrong, should be​: ["a", 1, "b", *, "c", *]

S03, L4346​:
"By default the C<zip> function reads to the end of the shortest list,
but a short list may always be extended arbitrarily by putting C<*>
after the final value, which replicates the final value as many times
as necessary."

Thank you!

Ilya

@p6rt
Copy link
Author

p6rt commented Apr 23, 2009

From @moritz

On Sun Apr 05 04​:31​:05 2009, ihrd wrote​:

Hi there,

say (<a b c> Z [1,*]).perl
["a", 1, "b", *] # wrong, should be​: ["a", 1, "b", *, "c", *]

S03, L4346​:
"By default the C<zip> function reads to the end of the shortest list,
but a short list may always be extended arbitrarily by putting C<*>
after the final value, which replicates the final value as many times
as necessary."

As I understand the spec, it should be <a 1 b 1 c 1>.
I've added a test for that to t/spec/S03-operators/misc.t

Cheers,
Moritz

@p6rt
Copy link
Author

p6rt commented Apr 23, 2009

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jul 27, 2010

From @bbkr

on Atlanta build​:

$ perl6 -e 'say (<a b c> Z 1,*).perl'
("a", 1, "b", Whatever.new())

@p6rt
Copy link
Author

p6rt commented Nov 16, 2010

From @moritz

The tests work now, so I assume everything is fine now.

@p6rt
Copy link
Author

p6rt commented Nov 16, 2010

@moritz - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Nov 16, 2010
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

1 participant