From the course: Scala Essential Training for Data Science

Unlock this course with a free trial

Join today to access over 24,600 courses taught by industry experts.

Creating parallel collections

Creating parallel collections

- [Instructor] We're going to be working with parallel collections, so we'll need to tell the REPL to include some needed dependencies. In particular, we want to work with parallel collections. We do this by using the DEP or dependency argument to the REPL and specify the library we want to load, and then we import that library within the scala REPL. Now, once we've started the REPL, there are two ways to create a parallel collection. We can convert a sequential collection into a parallel collection, or we can create a variable or value with a parallel collection data type. Now I've just moved over to my terminal window. Now the command we will use to start the REPL with the appropriate library loaded is first we use scala, which is what we've used in the past to invoke the REPL. And then we want to specify a dependency argument. And I'm just going to paste that dependency argument in. So we pass in the --dep and then we specify where the library is located. Now, in this case, it's at…

Contents