From: | "Sam S." <smls75 [...] gmail.com> |
Subject: | [LTA] Z and X think that a Slip represents multiple arguments |
To: | rakudobug [...] perl.org |
Date: | Mon, 6 Mar 2017 17:08:45 +0100 |
say <a b> X~ (1, 2, 3); # (a1 a2 a3 b1 b2 b3)
say <a b> X~ |(1, 2, 3); # (a123 b123)
say <a b> X~ (1, 2, 3).Slip; # (a123 b123)
Those last two seem wrong. It's as if the meta-operator thinks it got
four arguments, i.e. as if it was called like:
say &[X~]( <a b>, 1, 2, 3 ); # (a123 b123)
I think in keeping with the single-argument rule, the X and Z
meta-operators should behave as if both sides were bound to a +@
parameter, which would "disarm" the Slip and keep it from messing with
the internal algorithm:
sub a (+@a) { dd @a };
a |(1, 2, 3); # [1, 2, 3]