wei
04/18/2018, 11:56 PMval myList = List<MyClass>(...)
myList.filter(it.date > cutoffDate)
.filter(it.type != "excludedType")
.forEach {
// process the subset that went through the filters
...
}
For those elements that got filtered out in the above example, I also want to log them (say by sending a message to an outside listener to ack that I got this element but it failed the filter). How do I do that in an idiomatic way?