32 Working with List: Sorting and other operations
After reading this lesson, you will be able to
- Sort a list
- Produce a string representation of a sequence
- Sum all the numerical elements of a list
- Group items according to given criteria
In the previous lesson, you mastered how to filter elements of a sequence. In this lesson, you’ll learn about a variety of operations you can perform on lists. You’ll discover different approaches to sorting the items of a sequence. Also, you’ll learn how to produce a text representation for it. Finally, you’ll see how to restructure your list into a dictionary-like structure that groups elements with common features. In the capstone, you’ll use these operations to rank the films in the movies data set and ...
Get Get Programming with Scala now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.