We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
Scala parallel collections docs and MOOC mention a .remaining method on Splitter and a .splitter method on collections returning a Splitter:
.remaining
Splitter
.splitter
scala-parallel-collections/core/src/main/scala/scala/collection/parallel/ParIterableLike.scala
Lines 48 to 58 in 7bc6f6e
In practice, .remaining is actually defined on IterableSplitter:
IterableSplitter
scala-parallel-collections/core/src/main/scala/scala/collection/parallel/RemainsIterator.scala
Line 366 in 7bc6f6e
And the .splitter method is package-private:
Line 233 in 7bc6f6e
Why is that?
Is there a way to obtain an IterableSplitter from a collection using the public API?
In particular, a slide of the MOOC suggests this implementation of .fold on a Splitter:
.fold
How could I use it in practice, say on a ParVector?
ParVector
The text was updated successfully, but these errors were encountered:
My use case is this example: https://scastie.scala-lang.org/ZmMbFnGHRnuO5c3ByKxT7A. I'd like to avoid the dirty hack to access a private method.
Sorry, something went wrong.
it's possible @axel22 remembers something
No branches or pull requests
Hi,
Scala parallel collections docs and MOOC mention a
.remaining
method onSplitter
and a.splitter
method on collections returning aSplitter
:scala-parallel-collections/core/src/main/scala/scala/collection/parallel/ParIterableLike.scala
Lines 48 to 58 in 7bc6f6e
In practice,
.remaining
is actually defined onIterableSplitter
:scala-parallel-collections/core/src/main/scala/scala/collection/parallel/RemainsIterator.scala
Line 366 in 7bc6f6e
And the
.splitter
method is package-private:scala-parallel-collections/core/src/main/scala/scala/collection/parallel/ParIterableLike.scala
Line 233 in 7bc6f6e
Why is that?
Is there a way to obtain an
IterableSplitter
from a collection using the public API?In particular, a slide of the MOOC suggests this implementation of
.fold
on aSplitter
:How could I use it in practice, say on a
ParVector
?The text was updated successfully, but these errors were encountered: