问题描述:

Is there something like LINQ select in D?

I want to remove from a container all elements contained in the member of objects in a given array. I thought it would be nice if I could do:

myContainer.remove( myArray.select!( a => a.member ) ) ;

网友答案:

It is called map:

import std.algorithm;

myContainer.remove(myArray.map!(a => a.member));
相关阅读:
Top