-
Type:
Bug
-
Resolution: Not an Issue
-
Priority:
P4
-
None
-
Affects Version/s: 8
-
Component/s: core-libs
A DESCRIPTION OF THE PROBLEM :
It's about java.util.stream.Stream.reduce(U identity,BiFunction<U, ? super T, U> accumulator, BinaryOperator<U> combiner) documentation:
accumulator â an associative, non-interfering, stateless function for incorporating an additional element into a result
This means: (a op b) op c = a op (b op c).
The problem is that the above definition requires an BinaryOperator, not only a BiFunction, because (a op b) requires b of type T while (b op c) requires b of type U. If U and T are distinct, this is impossible.
FREQUENCY : always
It's about java.util.stream.Stream.reduce(U identity,BiFunction<U, ? super T, U> accumulator, BinaryOperator<U> combiner) documentation:
accumulator â an associative, non-interfering, stateless function for incorporating an additional element into a result
This means: (a op b) op c = a op (b op c).
The problem is that the above definition requires an BinaryOperator, not only a BiFunction, because (a op b) requires b of type T while (b op c) requires b of type U. If U and T are distinct, this is impossible.
FREQUENCY : always