Week 10. Functional Processing of Collections
A lambda is a segment of code that can be stored and executed later.
In the functional style of programming, we do not retrieve each element to operate on it, we instead pass a code segment to a collection to be applied to each element.
A stream provides useful methods to manipulate data sets, they unify the processing of elements of a collection and other sets of data.
We can filter a stream to select only specific elements.
We can map a stream to a new stream, where each element of the original stream is replaced with a new element derived from the original.
We can reduce a stream by applying a function that takes a whole stream and delivering a single result.
A pipeline is the combination of two or more stream functions in a chain, where each function is applied in turns.