2 Getting started with functional programming in Scala
This chapter covers
- Introducing the Scala language
- Explaining objects and namespaces
- Working with higher-order functions (passing functions to functions)
- Working with polymorphic functions (abstracting over types)
- Following types to implementations
Now that we have committed to using only pure functions, a question naturally emerges: How do we write even the simplest of programs? Most of us are used to thinking of programs as sequences of instructions that are executed in order, where each instruction has some kind of effect. In this chapter, we’ll begin learning how to write programs in the Scala language by just combining pure functions.
This chapter is mainly intended for those readers ...
Get Functional Programming in Scala, Second Edition 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.