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

ranges from multiple application of X not working #1794

Closed
p6rt opened this issue May 30, 2010 · 7 comments
Closed

ranges from multiple application of X not working #1794

p6rt opened this issue May 30, 2010 · 7 comments

Comments

@p6rt
Copy link

p6rt commented May 30, 2010

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

Searchable as RT75440$

@p6rt
Copy link
Author

p6rt commented May 30, 2010

From @finanalyst

from IRC #perl6 May 30

plain application of X works​:

finanalyst​: rakudo​: for 1,2 X <a b> { say "$^x $^y" }
p6eval​: rakudo 34542f​: OUTPUT«1 a 1 b␤2 a 2 b␤»

multiple application does not​:

finanalyst​: rakudo​: for 1,2 X (<a b> X 'x') { say "$^x $^y" }
p6eval​: rakudo 34542f​: ( no output )
finanalyst​: moritz_​: am i missing something in the second range?
moritz_​: something's wrong
moritz_​: I guess it has to do with list flattening

@p6rt
Copy link
Author

p6rt commented Aug 11, 2010

From @coke

On Sun May 30 01​:07​:08 2010, richardh wrote​:

from IRC #perl6 May 30

plain application of X works​:

finanalyst​: rakudo​: for 1,2 X <a b> { say "$^x $^y" }
p6eval​: rakudo 34542f​: OUTPUT«1 a 1 b␤2 a 2 b␤»

multiple application does not​:

finanalyst​: rakudo​: for 1,2 X (<a b> X 'x') { say "$^x $^y" }
p6eval​: rakudo 34542f​: ( no output )
finanalyst​: moritz_​: am i missing something in the second range?
moritz_​: something's wrong
moritz_​: I guess it has to do with list flattening

<[Coke]> rakudo​: for 1,2 X (<a b> X 'x') { say "$^x $^y" }
<p6eval> rakudo a389b2​: OUTPUT«1 a␤1 x␤1 b␤1 x␤2 a␤2 x␤2 b␤2 x␤»

I'm not sure if that output is correct, but it's definitely closer than the
original.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Aug 11, 2010

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

@p6rt
Copy link
Author

p6rt commented Dec 10, 2010

From @thundergnat

This apears to be doing the right thing now.

Tested on Rakudo 2010.11
This is Rakudo Perl 6, version 2010.11 built on parrot 2.10.1
RELEASE_2_10_1-679-g9bec614

perl6 -e 'for 1,2 X ( X "x") { say "$^x $^y" }'
1 a
1 x
1 b
1 x
2 a
2 x
2 b
2 x

@p6rt
Copy link
Author

p6rt commented Oct 5, 2011

From @coke

On Wed Aug 11 09​:49​:17 2010, coke wrote​:

On Sun May 30 01​:07​:08 2010, richardh wrote​:

from IRC #perl6 May 30

plain application of X works​:

finanalyst​: rakudo​: for 1,2 X <a b> { say "$^x $^y" }
p6eval​: rakudo 34542f​: OUTPUT«1 a 1 b␤2 a 2 b␤»

multiple application does not​:

finanalyst​: rakudo​: for 1,2 X (<a b> X 'x') { say "$^x $^y" }
p6eval​: rakudo 34542f​: ( no output )
finanalyst​: moritz_​: am i missing something in the second range?
moritz_​: something's wrong
moritz_​: I guess it has to do with list flattening

<[Coke]> rakudo​: for 1,2 X (<a b> X 'x') { say "$^x $^y" }
<p6eval> rakudo a389b2​: OUTPUT«1 a␤1 x␤1 b␤1 x␤2 a␤2 x␤2 b␤2 x␤»

I'm not sure if that output is correct, but it's definitely closer than the
original.

Yes, this is correct, just need tests to close the ticket.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Oct 8, 2011

From @moritz

Now tested in t/spec/S03-metaops/cross.t.

@p6rt p6rt closed this as completed Oct 8, 2011
@p6rt
Copy link
Author

p6rt commented Oct 8, 2011

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

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

No branches or pull requests

1 participant