# New Ticket Created by Jan Krňávek
# Please include the string: [perl #128533]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=128533 >
dd (1 X=> (1,2).List)>>.WHICH, (1 X=> (1,2).Array)>>.WHICH
prints:
("Pair|Int|1|Int|1", "P
This now throws a typed exception X::Syntax::NonAssociative
$ perl6 -e '1, 2 Z 3, 4 X 5, 6'
===SORRY!=== Error while compiling -e
Operators 'Z' and 'X' are non-associative and require parentheses
at -e:1
--> 1, 2 Z 3, 4 X⏏ 5, 6
expecting any of:
postfix
infix stopper
-operators.pod
Log Message:
---
clarify semantics of [op] for list associatives
On Fri, May 23, 2008 at 03:28:32PM -0700, Vasily Chekalkin wrote:
> Hello.
>
> Reworked implementation of 'map'
Excellent. A couple of notes:
1. Calling 'newclosure' from within 'map' is almost certainly wrong.
The newclosure op can only be called for closures that have the
current sub
# New Ticket Created by Vasily Chekalkin
# Please include the string: [perl #54746]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=54746 >
Hello.
There is trivial implementation of 'pop' operator form for Lis
# New Ticket Created by Vasily Chekalkin
# Please include the string: [perl #54742]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=54742 >
Hello.
Reworked implementation of 'map'
--
Bacek
Index: src/classes/List.pir
[EMAIL PROTECTED] wrote:
for [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] -> $x { say $x };
should work. Are there any non-slashy versions of this?
I'd guess
for @a; @b; @c -> $x { say $x;}
or
for (@a; @b; @c) -> $x { say $x;}
(are parens mandatory here?)
Miro
Luke Palmer wrote:
Rod Adams writes:
Are the following all legal and equivalent?
for 1..10 -> $a, $b { say $a, $b };
for 1..10 { say $^a, $^b };
sub foo ($a, $b) { say $a, $b };
for 1..10 &foo;
Almost. The last one should be:
for 1..10, &foo;
Doh! I knew that.
What happens
Rod Adams writes:
> Are the following all legal and equivalent?
>
>for 1..10 -> $a, $b { say $a, $b };
>
>for 1..10 { say $^a, $^b };
>
>sub foo ($a, $b) { say $a, $b };
>for 1..10 &foo;
Almost. The last one should be:
for 1..10, &foo;
> What happens with:
>
>for 1.
Are the following all legal and equivalent?
for 1..10 -> $a, $b { say $a, $b };
for 1..10 { say $^a, $^b };
sub foo ($a, $b) { say $a, $b };
for 1..10 &foo;
What happens with:
for 1..10 -> [EMAIL PROTECTED] { say @a };
-- Rod Adams
10 matches
Mail list logo