Most elegant way for split array of struct into components

Miguel L via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jul 5 01:10:33 PDT 2016


On Tuesday, 5 July 2016 at 07:33:40 UTC, Ali Çehreli wrote:
> On 07/04/2016 11:07 PM, Miguel L wrote:
>
> > [...]
>
> > [...]
> my_array?
>
> The simplest is to pick the element by std.algorithm.map:
>
> [...]

Thank you Ali, that works.
On the same subject, could it be possible to implement some class 
or struct method that works on an array of objects of that class 
or method?

class A
{
void Y(A[] a){...}
}

A[] array;
array.Y();

Sorry for my ignorance, i am just starting to work in D.


More information about the Digitalmars-d-learn mailing list