We should now understand how to use folds to calculate parallel implementations of simple algorithms. Hopefully, we should also have some appreciation for the ingenuity required to find efficient solutions that will perform the minimum number of iterations over the data.
Fortunately, the Clojure library Tesser (https://github.com/aphyr/tesser) includes implementations for common mathematical folds, including the mean, standard deviation, and covariance. To see how to use Tesser, let's consider the covariance of two fields from the IRS dataset: the salaries and wages,
A00200, the unemployment compensation,
We encountered covariance in Chapter 3, Correlation, as a measure of ...