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

Rich operations performed on collections

We have quite a few methods for our collections, which we can use to simplify almost every problem regarding collections in Scala. We are going to take a look at some important methods. First, let's set the stage: so consider a scenario where you have some structured data related to football players. and you have to perform manipulations based on that. We'll perform a set of operations on the data using our collection. We'll also learn about methods, their signatures, and use cases along the way. Here's a simple code snippet that shows what we just said—nothing too interesting as of now:

package chapter5 object CollectionOperations extends App { val source = io.Source.fromFile("../src/chapter5/football_stats.csv") ...

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