Open
Description
In 2.13, scala.jdk.StreamConverters
adds a toScala
extension method to streams that allows converting a stream to arbitrary Scala collections.
Collecting a parallel stream is especially efficient when the target collection supports efficient merging.
Currently the toScala
method is special-cased for the Accumulator
factory. It would make sense to generalize the ad-hoc AccumulatorFactoryInfo
into a type class for collections that support efficient merging.