# New Ticket Created by  Sam S. 
# Please include the string:  [perl #126522]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=126522 >


S07 [https://github.com/perl6/specs/blob/master/S07-lists.pod] claims:

  "The single argument rule does respect Scalar containers."
  "The single argument rule is implemented consistently throughout the 
language."

It lists 'for', '.push', 'infix:<,>' and 'postcircumfix:<[ ]>' as examples of
things that consistently follow the rule.

Since it does not explicitly mention the X and Z meta-operators as exceptions,
it stands to reason that they too should follow this rule.

But in current Rakudo they only follow it partially: They treat each operand as
a single argument whose elements to act on, but they do *not* respect 
Scalar-containerization of said arguments.

Example:

    say $(1, 2) X <a b c>

Output:

    ((1 a) (1 b) (1 c) (2 a) (2 b) (2 c))

Expected output:

    (((1 2) a) ((1 2) b) ((1 2) c))


TL;DR: This is either a Rakudo bug, or a case where S07 needs more 
clarification.

Reply via email to