I happened to find myself having a basic filtering need: I have a list and I have to filter it by an attribute of the items.
My code looked like this:
I find the second way more readable. It tells you exactly what the intention is: filter the list. PS: do not use 'list' as a variable name