News for hackers. Stuff that matters.
Re:Unifying fold left and fold right in Prolog by 082349872349872 on Friday August 26, 2022 @02:15PM (#32610892)
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

There are no comments on this comment yet.