Skip to Content
Scala in Action
book

Scala in Action

by Nilanjan Raychaudhuri
April 2013
Beginner to intermediate content levelBeginner to intermediate
416 pages
13h 46m
English
Manning Publications
Content preview from Scala in Action

Chapter 4. Having fun with functional data structures

This chapter covers

  • Introducing type parameterization with covariance and contravariance
  • Having fun with higher-order functions
  • Creating your own function objects in Scala
  • Introducing the Scala collection hierarchy and parallel collections

In this chapter you’ll switch gears to begin a fun and interesting part of the Scala language: Scala collections which broadly support two categories of data structures—immutable and mutable.

To understand and benefit from Scala collections, you need to know two concepts: type parameterization and higher-order functions. Type parameterization allows you to create types that take another type as a parameter (similar to Java generics). Higher-order ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Scala in Depth

Scala in Depth

Josh Suereth

Publisher Resources

ISBN: 9781935182757Publisher SupportOtherPublisher WebsiteErrata PageSupplemental ContentPurchase Link