On Tue, Apr 18, 2017 at 3:03 AM, Wesley Tanaka
wrote:
> I believe that foldl in Haskell https://www.haskell.org/hoogle/?hoogle=foldl
> admits a separate accumulator type from the type of the data structure being
> "folded"
> And, well, python lets you have your way
...Curiously enough, ReduceFn is by far the closest of all these to a
sequential fold. It is also internal (runner-facing rather than
user-facing).
On Tue, Apr 18, 2017 at 8:27 AM Dan Halperin
wrote:
> Great discussion! As Aljoscha says, Fold, Reduce, and Combine
Great discussion! As Aljoscha says, Fold, Reduce, and Combine are all
intertwined and not quite identical as we use them.
Another simple but perhaps coy answer is that if you read the MapReduce
paper by Dean and Ghemawat that started this all, they used "Map",
"Reduce", and "Combine" (see section
I believe that foldl in Haskell https://www.haskell.org/hoogle/?hoogle=foldlÂ
admits a separate accumulator type from the type of the data structure being
"folded"
And, well, python lets you have your way with mixing types, but this certainly
works as another example:python -c
Hi,
I think both fold and reduce fail to capture all the power or (what we call)
combine. Reduce requires a function of type (T, T) -> T. It requires that the
output type be the same as the input type. Fold takes a function (T, A) -> A
where T is the input type and A is the accumulation type.
As I start to understand Combine.Globally, it seems that it is, in spirit,
Beam's implementation of the "fold" higher-order function
https://en.wikipedia.org/wiki/Fold_(higher-order_function)#Folds_in_various_languages
Was there a reason the word "combine" was picked instead of either "fold" or