4 ms·
They can also be (T1,T2)->T3
by dkersten 12y ago
They can also be (T1,T2)->T3
- ajuc 12y agoNot really? When you reduce with function f(T1, T2) -> T3 the result of previous iteration becomes first argument for the next iteration, so they must be of the same "type". Or am I missing something?
- dkersten 12y agoAh, no, you're right. I was thinking that mapping can be f(T1)->T2 and how reducing can change types too, but I guess I wasn't paying enough attention because of course the reduce signature is f(accumulator, input) and the output is accumulator, so yea, you're absolutely right: f(T1,T2)->T1