Fix Scan/Reduce/Collect Factory Ambiguity #1884
Merged
+45
−75
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This puts the seed factory on
collect
and removes it fromscan
andreduce
due to ambiguity.See #1883 and #1881
The
collect
API was already very close so this fixes it to use a seed factory so the signature is now:I remove the factory overloads for
scan
andreduce
due to the issue in #1881 related to generics, type erasure and lambdas causing ambiguity and compilation failures.We may want to add at least a
scan
impl in the future with a seed factory, but it will need a different name if we do such asscanTo
. I don't want to do that now for 1.0 so we'll need to revisit that for 1.1 with more time to think about it.