Object-oriented Programming in C# An Introduction to LINQ
Map, filter, and reduce
Classical wisdom from functional programming on lists:
A large set of problems can be solved by mapping, filtering, and reduction.
Mapping
Apply a function to each element of a collection and return the resulting collection
LINQ: Select
Filtering
Apply a predicate on each element of a collection, and return those elements that satisfy the predicate
LINQ: Where
Reduction
Apply a binary function on neighbour pairs of collection elements (either from
left to right, or right to left), and "boil" down the collection to a single value.