O'Reilly logo

Learning Scala Programming by Vikash Sharma

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Parallel collections

Well, before discussing parallel collections in Scala, it's important to have some insight about what parallel computation is. How's it different from concurrent and asynchronous?

Well, we have spent some time understanding that asynchronous computation is non-blocking, hence we know that async computation happens from outside of the main program flow and gives you the value once the computation gets completed. To understand the difference between concurrent and parallel computation, let's look at the following example:

In the example, we are given a collection of numbers where we want to apply a function to each element ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required