[Haskell-cafe] Finding the average in constant space
stephen.tetley at gmail.com
Sun May 27 13:43:39 CEST 2012
There are a few blog posts by Conal Elliott and Max Rabkin (I think)
reifying folds as a data type to get more "composition" and thus fold
different functions at the same time. Search for "beautiful folding"
with the above authors names.
Personally I didn't find the examples significantly more "beautiful"
that using regular composition in a normal fold - only that that the
helper functions to manage pairs aren't in the standard library.
More information about the Haskell-Cafe