15.01.2018 00:21, Marc пишет:
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
import std.algorithm : filter; auto l = myList.filter!(e => e.id < 300);