3 ms·
You're right. > which is sort of what fold left or right is doing (but with z g and f being the same function). > it's a more higher order form of composition
by jhanschoo 6y ago
You're right.
> which is sort of what fold left or right is doing (but with z g and f being the same function).
> it's a more higher order form of composition
More precisely, a fold performs function composition on the provided operator curried with the respective elements, so that z g and f above are different functions (hence not commutative in general, but associative in general, wrt folding).