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

Function syntax doesn't work on meta operators #1976

Closed
p6rt opened this issue Jul 27, 2010 · 6 comments
Closed

Function syntax doesn't work on meta operators #1976

p6rt opened this issue Jul 27, 2010 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Jul 27, 2010

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

Searchable as RT76758$

@p6rt
Copy link
Author

p6rt commented Jul 27, 2010

From @markjreed

say [+](2..7),8,9
44

That should produce the same thing as this​:

say ([+]2..7),8,9
2789

Functional notation works for named functions, just not for meta-operators.

--
Mark J. Reed <markjreed@​gmail.com>

@p6rt
Copy link
Author

p6rt commented Jul 28, 2010

From @moritz

On Tue Jul 27 10​:44​:02 2010, markjreed wrote​:

say [+](2..7),8,9
44

That should produce the same thing as this​:

say ([+]2..7),8,9
2789

Functional notation works for named functions, just not for
meta-operators.

I'm not sure it's supposed to be as you said - after all, +(1 * 2)
doesn't parse the + as a function call either - that's only for
alphanumerics followed by (), otherwise it's only a matter of precedence.

Could please you cite a piece of the spec that supports your claim?

Moritz

@p6rt
Copy link
Author

p6rt commented Jul 28, 2010

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

@p6rt
Copy link
Author

p6rt commented Aug 25, 2010

From @masak

<TimToady> rakudo​: say [+](1,2,3) / 2; # fayl
<p6eval> rakudo 3a339e​: OUTPUT«1.5␤»
<TimToady> should print 3
<pmichaud> right
<pmichaud> I don't think rakudo's parser understands [+] as function
call syntax yet.

@p6rt
Copy link
Author

p6rt commented Mar 31, 2012

From @moritz

works now, and tested in S03-metaops/reduce.t

@p6rt
Copy link
Author

p6rt commented Mar 31, 2012

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

@p6rt p6rt closed this as completed Mar 31, 2012
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