Hacker News new | ask | show | jobs
by 082349872349872 1395 days ago
After you have a right fold and a left fold (both of which fold elemental values one by one into a bulk accumulation), might as well pretend we've got access to a bit more working memory than in the days of Unit Record Equipment, and write an associative "bottom up" fold, that first combines pairs of elemental values, then combines pairs of those combinations, etc., terminating with a single bulk result.

cf http://xahlee.info/comp/i/ICFPAugust2009Steele.pdf