Functional Programming in Scala, Second Edition

· ·
· Sold by Simon and Schuster
Ebook
488
Pages
Eligible

About this ebook

This international bestseller has been revised with new exercises, annotations, and full coverage of Scala 3.

In Functional Programming in Scala, Second Edition you will learn how to:

  • Recognize and write purely functional code
  • Work with errors without using exceptions
  • Work with state and concurrency
  • Interact with functional structures that define common behaviors
  • Write code that performs I/O without sacrificing functional programming

Functional Programming in Scala has helped over 30,000 developers discover the power of functional programming. You’ll soon see why reviewers have called it “mindblowing”! The book smooths the complexity curve of functional programming, making it simple to understand the basics and intuitive to progress to more advanced topics. Concrete examples and exercises show you FP in the real world and reveal how it can improve your everyday coding practices. This second edition comes packed with the latest standards of FP, as well as full code updates to Scala 3, and its new language features.

Foreword by Daniel Spiewak.

About the Technology

Functional code is easy to test, reuse, and parallelize, and it’s practically immune to whole categories of state-related bugs. With its strong functional features, familiar syntax, and seamless interoperability with Java, there’s no better place to start learning functional programming than the flexible Scala language.

About the Book

In Functional Programming with Scala, Second Edition you’ll learn functional programming from first principles. Hands-on exercises and examples make it easy to start thinking and coding functionally. This revised edition contains extensive exercise annotations to help you explore FP in depth, along with steps to build your own functional libraries in Scala. Once the functional lightbulb goes on, you’ll never look at coding the same way again.

What’s Inside

  • Recognize and write purely functional code
  • Work with errors without using exceptions
  • Work with state and concurrency
  • Interact with functional structures that define common behaviors

About the Reader

For Java or Scala programmers. No knowledge of functional programming required.

About the Author

Michael Pilquist is the lead maintainer of FS2, a functional streaming library, and contributes to the Typelevel ecosystem. Paul Chiusano and Rúnar Bjarnason are recognized experts in functional programming and authors of the first edition of Functional Programming with Scala.

Table of Contents:



PART 1 - INTRODUCTION TO FUNCTIONAL PROGRAMMING
1 What is functional programming?
2 Getting started with functional programming in Scala
3 Functional data structures
4 Handling errors without exceptions
5 Strictness and laziness
6 Purely functional state
PART 2 - FUNCTIONAL DESIGN AND COMBINATOR LIBRARIES
7 Purely functional parallelism
8 Property-based testing
9 Parser combinators
PART 3 - COMMON STRUCTURES IN FUNCTIONAL DESIGN
10 Monoids
11 Monads
12 Applicative and traversable functors
PART 4 - EFFECTS AND I/O
13 External effects and I/O
14 Local effects and mutable state
15 Stream processing and incremental I/O

About the author

Michael Pilquist has been using Scala since 2009, when he was convinced to give it a try by listening to Dick Wall and the Java Posse. He introduced Scala at Comcast and has written a number of open source functional programming libraries, including scodec, simulacrum, and ip4s. He is also the lead maintainer of FS2, a functional streaming library, and contributes heavily to the Typelevel ecosystem.

Paul Chiusano has been writing and shipping functional code in Scala since 2008 and is responsible for the introduction and growth of Scala usage at his company, Capital IQ. As part of this effort he co-designed a functional programming curriculum and taught an internal course for coworkers interested in learning FP. Paul is also a regular blogger and speaker on functional programming and Scala.

Rúnar Bjarnason and Paul Chiusano are recognized experts in functional programming and authors of the first edition of Functional Programming with Scala.

Rate this ebook

Tell us what you think.

Reading information

Smartphones and tablets
Install the Google Play Books app for Android and iPad/iPhone. It syncs automatically with your account and allows you to read online or offline wherever you are.
Laptops and computers
You can listen to audiobooks purchased on Google Play using your computer's web browser.
eReaders and other devices
To read on e-ink devices like Kobo eReaders, you'll need to download a file and transfer it to your device. Follow the detailed Help Center instructions to transfer the files to supported eReaders.