Re: RFC 272 (v1) Arrays: transpose()

[email protected] ("Jeremy Howard") Sat, 23 Sep 2000 07:57:28 +1100
Newsgroups perl.perl6.language.data
Message-ID <001901c024d7$b9cccff0$0100a8c0@jeremy>
Karl Glazebrook wrote:
> you should look at the PDL mv() and xchg() methods
> and factor this into your thinking!
>
Actually, the RFC is based on PDL's xchg()! I forgot to document using
negative numbers to count from the last dimension--I'll add that into the
next version. Are there any other differences with xchg() that you think
would be useful?

I haven't used mv() before, but now I look at it I can see it's pretty
interesting. Is this used much? If we add it to the RFC, do you think we'd
want a separate function, or add another arg to transpose:

  transpose([$a,$b], 0, @arr);   # xchg
  transpose([$a,$b], 1, @arr);   # mv