
It has already been established in this thread what Charles meant by 3.
He meant that a fold-function that has the property he is after would
guarantee that it:
a) takes all the content elements from a data structure, say x1,...,xn,
b) builds an application tree with the to-be-folded, binary operation f in
the internal nodes of a binary tree, whose leafs, read from left to right,
form exactly the sequence x1,...,xn,
c) evaluates that application tree.
Do you agree that what I describe above is a property of a given fold-like
function, not of the f handed to that fold-like function?
And do you agree that what I describe above is a property that is weaker
than (and so, in particular different from) for example the property "this
fold-like function is foldl or foldr".
2015-10-24 19:55 GMT+02:00 Kim-Ee Yeoh
On Sun, Oct 25, 2015 at 12:42 AM, Matteo Acerbi
wrote: For what concerns question 3, I didn't understand the idea of calling a function "associatively".
This. Associativity is a property of binary operators. It's not a property of the catamorphism 'calling' on a given binary operator.
Also, when Charles writes: "Then it goes on to use f in "thisFold f [0,1,2]" like "f (1 (f 0 2))""
commutativity appears to raise its head.
-- Kim-Ee