Notes on fold and reduce.