Video description
In Video Editions the narrator reads the book while the content, figures, code listings, diagrams, and text appear on the screen. Like an audiobook that you can also watch as a video.
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.
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 in 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 Authors
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.
Quotes
Functional programming in Scala, both the technique and the book, have entrenched themselves firmly in the landscape of the language and ecosystem….This new edition is an effective companion for the community inventing tomorrow.
- From the Foreword by Daniel Spiewak, Creator of Cats Effect
Deepen your understanding of practical functional programming in Scala with this, the ultimate guide.
- Bill Venners, Artima
The first edition of FPiS was one of the turning points in my journey through the FP rabbit hole. It was eye-opening to be able to prove that one typeclass interface is equivalent to another. The book’s second edition preserves the unique vision of FPiS: to guide readers via practical coding idioms towards a mathematically rigorous approach in FP.
- Sergei Winitzki, Workday
Table of contents
- Part 1. Introduction to functional programming
- Chapter 1. What is functional programming?
- Chapter 1. Exactly what is a (pure) function?
- Chapter 1. Referential transparency, purity, and the substitution model
- Chapter 1. Conclusion
- Chapter 1. Summary
- Chapter 2. Getting started with functional programming in Scala
- Chapter 2. Objects and namespaces
- Chapter 2. Higher-order functions: Passing functions to functions
- Chapter 2. Polymorphic functions: Abstracting over types
- Chapter 2. Following types to implementations
- Chapter 2. Conclusion
- Chapter 2. Summary
- Chapter 2. Exercise answers
- Chapter 3. Functional data structures
- Chapter 3. Pattern matching
- Chapter 3. Data sharing in functional data structures
- Chapter 3. Trees
- Chapter 3. Conclusion
- Chapter 3. Summary
- Chapter 3. Exercise answers
- Chapter 4. Handling errors without exceptions
- Chapter 4. Possible alternatives to exceptions
- Chapter 4. The Option data type
- Chapter 4. The Either data type
- Chapter 4. Conclusion
- Chapter 4. Summary
- Chapter 4. Exercise answers
- Chapter 5. Strictness and laziness
- Chapter 5. Lazy lists: An extended example
- Chapter 5. Separating program description from evaluation
- Chapter 5. Infinite lazy lists and corecursion
- Chapter 5. Conclusion
- Chapter 5. Summary
- Chapter 5. Exercise answers
- Chapter 6. Purely functional state
- Chapter 6. Purely functional random number generation
- Chapter 6. Making stateful APIs pure
- Chapter 6. A better API for state actions
- Chapter 6. A general state action data type
- Chapter 6. Purely functional imperative programming
- Chapter 6. Conclusion
- Chapter 6. Summary
- Chapter 6. Exercise Answers
- Part 2. Functional design and combinator libraries
- Chapter 7. Purely functional parallelism
- Chapter 7. Picking a representation
- Chapter 7. The algebra of an API
- Chapter 7. Refining combinators to their most general form
- Chapter 7. Conclusion
- Chapter 7. Summary
- Chapter 7. Exercise answers
- Chapter 8. Property-based testing
- Chapter 8. Test case minimization
- Chapter 8. Testing higher-order functions and future directions
- Chapter 8. The laws of generators
- Chapter 8. Conclusion
- Chapter 8. Summary
- Chapter 8. Exercise answers
- Chapter 9. Parser combinators
- Chapter 9. A possible algebra
- Chapter 9. Handling context sensitivity
- Chapter 9. Writing a JSON parser
- Chapter 9. Error reporting
- Chapter 9. Implementing the algebra
- Chapter 9. Conclusion
- Chapter 9. Summary
- Chapter 9. Exercise answers
- Part 3. Common structures in functional design
- Chapter 10. Monoids
- Chapter 10. Folding lists with monoids
- Chapter 10. Associativity and parallelism
- Chapter 10. Example: Parallel parsing
- Chapter 10. Typeclasses
- Chapter 10. Foldable data structures
- Chapter 10. Composing monoids
- Chapter 10. Conclusion
- Chapter 10. Summary
- Chapter 10. Exercise answers
- Chapter 11. Monads
- Chapter 11. Monads: Generalizing the flatMap and unit functions
- Chapter 11. Monadic combinators
- Chapter 11. Monad laws
- Chapter 11. Just what is a monad?
- Chapter 11. Conclusion
- Chapter 11. Summary
- Chapter 11. Exercise answers
- Chapter 12. Applicative and traversable functors
- Chapter 12. The Applicative trait
- Chapter 12. The difference between monads and applicative functors
- Chapter 12. The advantages of applicative functors
- Chapter 12. The applicative laws
- Chapter 12. Traversable functors
- Chapter 12. Uses of Traverse
- Chapter 12. Conclusion
- Chapter 12. Summary
- Chapter 12. Exercise answers
- Part 4. Effects and I/O
- Chapter 13. External effects and I/O
- Chapter 13. A simple IO type
- Chapter 13. Avoiding the StackOverflowError
- Chapter 13. A more nuanced I/O type
- Chapter 13. Non-blocking and asynchronous I/O
- Chapter 13. Capabilities
- Chapter 13. A general-purpose I/O type
- Chapter 13. Why the IO type is insufficient for streaming I/O
- Chapter 13. Conclusion
- Chapter 13. Summary
- Chapter 13. Exercise answers
- Chapter 14. Local effects and mutable state
- Chapter 14. A data type to enforce the scoping of side effects
- Chapter 14. Purity is contextual
- Chapter 14. Conclusion
- Chapter 14. Summary
- Chapter 14. Exercise answers
- Chapter 15. Stream processing and incremental I/O
- Chapter 15. Simple stream transformations
- Chapter 15. Extensible pulls and streams
- Chapter 15. Applications
- Chapter 15. Conclusion
- Chapter 15. Summary
- Chapter 15. Exercise answers
Product information
- Title: Functional Programming in Scala, Second Edition, Video Edition
- Author(s):
- Release date: July 2023
- Publisher(s): Manning Publications
- ISBN: None
You might also like
book
Functional Programming in Scala
Functional Programming in Scala is a serious tutorial for programmers looking to learn FP and apply …
video
Functional Programming in Scala video edition
"Leads to deep insights into the nature of computation." From the Foreword by Martin Odersky, Creator …
audiobook
Functional Programming in Scala, Second Edition
This international bestseller has been revised with new exercises, annotations, and full coverage of Scala 3. …
book
Functional Programming in Scala, Second Edition
This international bestseller has been revised with new exercises, annotations, and full coverage of Scala 3. …