Functional Programming in Scala, Second Edition, Video Edition

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

  1. Part 1. Introduction to functional programming
  2. Chapter 1. What is functional programming?
  3. Chapter 1. Exactly what is a (pure) function?
  4. Chapter 1. Referential transparency, purity, and the substitution model
  5. Chapter 1. Conclusion
  6. Chapter 1. Summary
  7. Chapter 2. Getting started with functional programming in Scala
  8. Chapter 2. Objects and namespaces
  9. Chapter 2. Higher-order functions: Passing functions to functions
  10. Chapter 2. Polymorphic functions: Abstracting over types
  11. Chapter 2. Following types to implementations
  12. Chapter 2. Conclusion
  13. Chapter 2. Summary
  14. Chapter 2. Exercise answers
  15. Chapter 3. Functional data structures
  16. Chapter 3. Pattern matching
  17. Chapter 3. Data sharing in functional data structures
  18. Chapter 3. Trees
  19. Chapter 3. Conclusion
  20. Chapter 3. Summary
  21. Chapter 3. Exercise answers
  22. Chapter 4. Handling errors without exceptions
  23. Chapter 4. Possible alternatives to exceptions
  24. Chapter 4. The Option data type
  25. Chapter 4. The Either data type
  26. Chapter 4. Conclusion
  27. Chapter 4. Summary
  28. Chapter 4. Exercise answers
  29. Chapter 5. Strictness and laziness
  30. Chapter 5. Lazy lists: An extended example
  31. Chapter 5. Separating program description from evaluation
  32. Chapter 5. Infinite lazy lists and corecursion
  33. Chapter 5. Conclusion
  34. Chapter 5. Summary
  35. Chapter 5. Exercise answers
  36. Chapter 6. Purely functional state
  37. Chapter 6. Purely functional random number generation
  38. Chapter 6. Making stateful APIs pure
  39. Chapter 6. A better API for state actions
  40. Chapter 6. A general state action data type
  41. Chapter 6. Purely functional imperative programming
  42. Chapter 6. Conclusion
  43. Chapter 6. Summary
  44. Chapter 6. Exercise Answers
  45. Part 2. Functional design and combinator libraries
  46. Chapter 7. Purely functional parallelism
  47. Chapter 7. Picking a representation
  48. Chapter 7. The algebra of an API
  49. Chapter 7. Refining combinators to their most general form
  50. Chapter 7. Conclusion
  51. Chapter 7. Summary
  52. Chapter 7. Exercise answers
  53. Chapter 8. Property-based testing
  54. Chapter 8. Test case minimization
  55. Chapter 8. Testing higher-order functions and future directions
  56. Chapter 8. The laws of generators
  57. Chapter 8. Conclusion
  58. Chapter 8. Summary
  59. Chapter 8. Exercise answers
  60. Chapter 9. Parser combinators
  61. Chapter 9. A possible algebra
  62. Chapter 9. Handling context sensitivity
  63. Chapter 9. Writing a JSON parser
  64. Chapter 9. Error reporting
  65. Chapter 9. Implementing the algebra
  66. Chapter 9. Conclusion
  67. Chapter 9. Summary
  68. Chapter 9. Exercise answers
  69. Part 3. Common structures in functional design
  70. Chapter 10. Monoids
  71. Chapter 10. Folding lists with monoids
  72. Chapter 10. Associativity and parallelism
  73. Chapter 10. Example: Parallel parsing
  74. Chapter 10. Typeclasses
  75. Chapter 10. Foldable data structures
  76. Chapter 10. Composing monoids
  77. Chapter 10. Conclusion
  78. Chapter 10. Summary
  79. Chapter 10. Exercise answers
  80. Chapter 11. Monads
  81. Chapter 11. Monads: Generalizing the flatMap and unit functions
  82. Chapter 11. Monadic combinators
  83. Chapter 11. Monad laws
  84. Chapter 11. Just what is a monad?
  85. Chapter 11. Conclusion
  86. Chapter 11. Summary
  87. Chapter 11. Exercise answers
  88. Chapter 12. Applicative and traversable functors
  89. Chapter 12. The Applicative trait
  90. Chapter 12. The difference between monads and applicative functors
  91. Chapter 12. The advantages of applicative functors
  92. Chapter 12. The applicative laws
  93. Chapter 12. Traversable functors
  94. Chapter 12. Uses of Traverse
  95. Chapter 12. Conclusion
  96. Chapter 12. Summary
  97. Chapter 12. Exercise answers
  98. Part 4. Effects and I/O
  99. Chapter 13. External effects and I/O
  100. Chapter 13. A simple IO type
  101. Chapter 13. Avoiding the StackOverflowError
  102. Chapter 13. A more nuanced I/O type
  103. Chapter 13. Non-blocking and asynchronous I/O
  104. Chapter 13. Capabilities
  105. Chapter 13. A general-purpose I/O type
  106. Chapter 13. Why the IO type is insufficient for streaming I/O
  107. Chapter 13. Conclusion
  108. Chapter 13. Summary
  109. Chapter 13. Exercise answers
  110. Chapter 14. Local effects and mutable state
  111. Chapter 14. A data type to enforce the scoping of side effects
  112. Chapter 14. Purity is contextual
  113. Chapter 14. Conclusion
  114. Chapter 14. Summary
  115. Chapter 14. Exercise answers
  116. Chapter 15. Stream processing and incremental I/O
  117. Chapter 15. Simple stream transformations
  118. Chapter 15. Extensible pulls and streams
  119. Chapter 15. Applications
  120. Chapter 15. Conclusion
  121. Chapter 15. Summary
  122. Chapter 15. Exercise answers

Product information

  • Title: Functional Programming in Scala, Second Edition, Video Edition
  • Author(s): Michael Pilquist
  • Release date: July 2023
  • Publisher(s): Manning Publications
  • ISBN: None