Is logical subsetting of an array possible ?
Sahil via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Jul 14 04:07:47 PDT 2016
On Thursday, 14 July 2016 at 11:01:20 UTC, Nicholas Wilson wrote:
> On Thursday, 14 July 2016 at 10:51:33 UTC, Nicholas Wilson
> wrote:
> I should explain this a bit more if you are totally new to D.
>
> although filter looks like a method for an array type it is not
> it is a function.
> in D function like f(a,b) can be rewritten as a.f(b);
>
> the '!' is the template instansiation operator (as filter is a
> template function) and its template parameter is the predicate
> to filter in this case ,(e => e>3).
>
> As with anyone totally new to D i cannot recommend more highly
> Ali's book.
Yes, I have started with this book.
Thanks for the explanation!
More information about the Digitalmars-d-learn
mailing list