What's equivalent to C#'s select?
Seb
seb at wilzba.ch
Sun Jan 14 21:59:26 UTC 2018
On Sunday, 14 January 2018 at 21:21:52 UTC, Marc wrote:
> give a list, how can I select only the elements of a range
> according to a condition give by a lamba function?
>
> something like this:
>
>> auto l = myList.select(e => e.id < 300);
>
> it would return a range. Similar to C#'s select:
>
> https://msdn.microsoft.com/en-us/library/bb548891(v=vs.110).aspx
Shameless self-plug - you might like this (incomplete) comparison
between LINQ and D ranges:
https://github.com/wilzbach/linq
More information about the Digitalmars-d-learn
mailing list