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

.map method (also grep) doesn't allow pointy-blocks #533

Closed
p6rt opened this issue Dec 24, 2008 · 5 comments
Closed

.map method (also grep) doesn't allow pointy-blocks #533

p6rt opened this issue Dec 24, 2008 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Dec 24, 2008

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

Searchable as RT61672$

@p6rt
Copy link
Author

p6rt commented Dec 24, 2008

From dwhipp@nvidia.com

% ./perl6 -e '.say for <a 1 b 2>.map​: { $^a ~ $^b }'
a1
b2

% ./perl6 -e '.say for <a 1 b 2>.map​: -> $a, $b { $a ~ $b }'
Statement not terminated properly at line 1, near "​: -> $a, $"


This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.


@p6rt
Copy link
Author

p6rt commented Dec 26, 2008

From @pmichaud

On Wed Dec 24 10​:54​:11 2008, dwhipp@​nvidia.com wrote​:

% ./perl6 -e '.say for <a 1 b 2>.map​: { $^a ~ $^b }'
a1
b2

% ./perl6 -e '.say for <a 1 b 2>.map​: -> $a, $b { $a ~ $b }'
Statement not terminated properly at line 1, near "​: -> $a, $"

Currently Rakudo has difficulty parsing pointy blocks in term position
-- it gets confused by the leading hyphen and thinks it's a prefix​:<->.
(For a variety of reasons, terms aren't currently participating in
PGE's form of longest token matching.)

I'll see if I can fix this in the very near future.

Pm

@p6rt
Copy link
Author

p6rt commented Dec 26, 2008

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

@p6rt
Copy link
Author

p6rt commented Dec 26, 2008

From @pmichaud

Now fixed in r34388​:

  $ ./parrot perl6.pbc -e '.say for <a 1 b 2>.map​: -> $a, $b { $a ~ $b }'
  a1
  b2
  $

Thanks!

Pm

@p6rt
Copy link
Author

p6rt commented Dec 26, 2008

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

@p6rt p6rt closed this as completed Dec 26, 2008
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