Re:Rich Hickey – Inside Transducers [video]
by dkersten on Friday November 21, 2014 @11:35AM
(#8641978)
They can also be (T1,T2)->T3
[ Parent
| on HN ]
Not 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?
Re:Rich Hickey – Inside Transducers [video]
by dkersten on Sunday November 23, 2014 @06:24AM
(#8648470)
Ah, 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