On Wed, Nov 11, 2009 at 4:15 PM, David Mertens <[email protected]> wrote:
> Matt meant to send this to the whole list.  If this isn't a really cool
> example of data flow, I don't know what is:
>
> On Wed, Nov 11, 2009 at 8:07 AM, Matthew Kenworthy
> <[email protected]> wrote:
>>
>> Gabor,
>>
>> If you want to drop one of the transpose, you could also do:
>>
>> $b = $a->transpose;
>>
>> $b .= $b->rotate(1);
>>
>> That will flow back the rotate into $a.
>>

Hmm, it does not seem to work for me:

perldl> p $x

[
 [0 0 0]
 [0 1 0]
 [0 0 0]
]

perldl> $y = $x->transpose;

perldl> $y .= $y->rotate(1);

perldl> p $x

[
 [0 0 0]
 [0 1 0]
 [0 0 0]
]

perldl> p $y

[
 [0 0 0]
 [0 0 1]
 [0 0 0]
]


which is the same as

perldl>  p $x->rotate(1)
[
 [0 0 0]
 [0 0 1]
 [0 0 0]
]

while I was expecting

perldl> p $x->transpose->rotate(1)->transpose

[
 [0 0 0]
 [0 0 0]
 [0 1 0]
]


Gabor

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to