Safe and completely lazy parallel iteration in Scala.
import scala.concurrent.ExecutionContext.Implicits.global Iterator(1, 2, 3).parMap(_ + 5).toSeq shouldBe Seq(6, 7, 8)
- Evaluate an expression in parallel over an iterator with complete laziness
- Prevent excessive back pressure by blocking on a bounded capacity queue
- All exceptions in the input iterator, or applied function, are raised
iterata, maximize CPU utilization by avoiding data chunking
Future.traverse, do not accumulate results before emitting them
If Mill is your build tool
ivyDeps ++ Agg(ivy"io.cvbio.collection::iterato::0.0.1")
If SBT is your build tool
libraryDependencies += "io.cvbio.collection" %% "iterato" % "0.0.1"