[prev in list] [next in list] [prev in thread] [next in thread]
List: perl6-language
Subject: Re: Array rotate
From: "John M. Dlugosz" <2nb81lz02 () sneakemail ! com>
Date: 2009-06-13 19:27:18
Message-ID: 2193-73279 () sneakemail ! com
[Download RAW message or body]
Jon Lang dataweaver-at-gmail.com |Perl 6| wrote:
> On Fri, Jun 12, 2009 at 10:02 AM, yary<not.com@gmail.com> wrote:
>
>> I am tickled pink to see an Array "rotate" method in the settings spec
>> S032, as I was thinking of writing up a little discussion on the very
>> topic.
>>
>> Has there been discussion on using array rotate on multi-dimensional
>> arrays? Being able to pass in a vector as the amount to rotate would
>> be useful.
>>
>
> With a multi-dimensional array, a number of transforms can be considered:
>
> * you can rearrange the elements along a given dimension (e.g., rotate
> and reverse).
> * you can rearrange the dimensions themselves (e.g., transpose).
>
>
A short time ago, something similar came up.
I think the built-in's should stay simple, and a module (or several
different ones) can exist to do comprehensive features for
multi-dimensional arrays. Designing that is really a separate project
in itself, and it may shake out with use.
So keep it out of the core spec.
--John
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic