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

&[==] and other similar short forms #990

Closed
p6rt opened this issue May 12, 2009 · 8 comments
Closed

&[==] and other similar short forms #990

p6rt opened this issue May 12, 2009 · 8 comments
Labels

Comments

@p6rt
Copy link

p6rt commented May 12, 2009

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

Searchable as RT65588$

@p6rt
Copy link
Author

p6rt commented May 12, 2009

From @masak

<moritz_> rakudo​: &[==]
<p6eval> rakudo feca3f​: OUTPUT«Syntax error at line 1, near "&[==]" [...]
<moritz_> masak​: care to submit as a TODO bug?
<masak> moritz_​: TODO bug -- you got it.

@p6rt
Copy link
Author

p6rt commented Jul 29, 2009

From @colomon

colomon​: rakudo​: say sort(&[<=>], <1 10 2 3>).perl
[08​:46am] p6eval​: rakudo 6999e5​: OUTPUT«Statement not terminated
properly at line 2, near "(&[<=>], <"␤in Main
(src/gen_setting.pm​:3359)␤»

This should work according to
http://perlcabal.org/syn/S03.html#Nesting_of_metaoperators

--
Solomon Foster​: colomon@​gmail.com
HarmonyWare, Inc​: http://www.harmonyware.com

@p6rt
Copy link
Author

p6rt commented Aug 1, 2009

From @kyleha

This is an automatically generated mail to inform you that tests are now available in t/spec/S03-operators/nesting.t

commit 1e56508ad5008b7c0d0426c54d7d7028c560b7ae
Author​: kyle <kyle@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Sat Aug 1 04​:30​:31 2009 +0000

  [t/spec] Tests for RT #​68008
 
  git-svn-id​: http://svn.pugscode.org/pugs@&#8203;27828 c213334d-75ef-0310-aa23-eaa082d1ae64

Inline Patch
diff --git a/t/spec/S03-operators/nesting.t b/t/spec/S03-operators/nesting.t
new file mode 100644
index 0000000..07cf87c
--- /dev/null
+++ b/t/spec/S03-operators/nesting.t
@@ -0,0 +1,10 @@
+use v6;
+use Test;
+
+plan 2;
+
+# L<S03/Meta operators/Nesting of metaoperators/Any infix function may be referred to as a noun either by the normal long form or a short form>
+
+#?rakudo 2 skip 'RT #68008'
+ok &infix:<+> === &[+], 'long and short form are the same';
+is sort( &[<=>], <5 3 2 1 4> ), <1 2 3 4 5>, 'sort works using &[<=>]';

@p6rt
Copy link
Author

p6rt commented Aug 1, 2009

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

@p6rt
Copy link
Author

p6rt commented Apr 20, 2010

From @jnthn

On Wed Jul 29 05​:56​:22 2009, colomon@​gmail.com wrote​:

colomon​: rakudo​: say sort(&[<=>], <1 10 2 3>).perl
[08​:46am] p6eval​: rakudo 6999e5​: OUTPUT«Statement not terminated
properly at line 2, near "(&[<=>], <"␤in Main
(src/gen_setting.pm​:3359)␤»

This should work according to
http://perlcabal.org/syn/S03.html#Nesting_of_metaoperators

Oh awesome I fixed it.

say sort(&[<=>], <1 10 2 3>).perl
("1", "2", "3", "10")

Given to moritz++ for spectests.

Thanks,

Jonathan

@p6rt
Copy link
Author

p6rt commented Apr 20, 2010

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

@p6rt
Copy link
Author

p6rt commented Apr 20, 2010

From @moritz

Tested in S03-operators/nesting.t

@p6rt
Copy link
Author

p6rt commented Apr 20, 2010

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

@p6rt p6rt closed this as completed Apr 20, 2010
@p6rt p6rt added the Todo label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant