<pugs-comm...@feather.perl6.nl> wrote:
> +Regardless of whether the dwim is forced or emergent from the shapes
> +of the arrays, once the side to dwim on has been chosen, the dwim
> +semantics on the dwimmy side are always:
> +
> +    (@dwimmyside xx *).batch(@otherside.elems)
> +
> +This produces a list the same length as the corresponding dimension
> +on the other side.  The original operator is then recursively applied
> +to each corresponding pair of elements, in case there are more dimensions
> +to handle.

Very useful; thank you.  One more request: could you provide a few
multidimensional examples?  For instance:

    (1, 2, 3; 4, 5, 6) «+» (1, 2; 3, 4; 5, 6)

My gut instinct is that this would be equivalent to:

    (1, 2, 3; 4, 5, 6; 1, 2, 3) «+» (1, 2; 3, 4; 5, 6) # lhs dwimmery
in the first dimension

...which in turn would be equivalent to:

    (1, 2, 3; 4, 5, 6; 1, 2, 3) «+» (1, 2, 1; 3, 4, 3; 5, 6, 5) # rhs
dwimmery in the second dimension

Or:

    (2, 4, 4; 7, 9, 9; 6, 8, 8)

But I'm not sure.  If I'm right, I'd like it confirmed; if I'm wrong,
I want to see what the right way to do it is.

-- 
Jonathan "Dataweaver" Lang

Reply via email to