Learning Functional Programming
Subtitle: Managing Code Complexity by Thinking Functionally
Publisher: O'Reilly Media, Incorporated
Published: August 11th 2022
Place of publication: USA
Language: eng
ISBN-13: 9781098111755
Copyright date: 2022
First sentence: Functional programming? Functors? Monoids? Monads? “I’m not a mathematician!” you might say.
Description: Learn how to think and write code like a functional programmer. With this practical guide, software developers familiar with object-oriented programming will dive into the core concepts of functional programming and learn how to use both functional and OOP features together on large or complex software projects.

Author Jack Widman uses samples from Java, Python, C#, Scala, and JavaScript to help you gain a new perspective and a set of tools for managing the complexity in your problem domain. You'll be able to write code that's simpler, reusable, easier to test and modify, and more consistently correct. This book also shows you how to use patterns from category theory to help bridge the gap between OOP and functional programming.

- Learn functional programming fundamentals and explore the way functional programmers approach problems
- Understand how FP differs from object-oriented and imperative programming
- Use a set of practical, applicable design patterns that model reality in a functional way
- Learn how to incorporate FP and OOP features into software projects
- Apply functional design patterns appropriately and use them to write correct, robust, and easily modifiable code
Table of contents: label: 0.
title: Preface; title: Who Should Use This Book?; title: How The Book Is Organized; title: Conventions Used in This Book; title: O’Reilly Online Learning; title: How to Contact Us; label: 1.
title: What Is Functional Programming?; title: Immutability; title: Referential Transparency; title: Higher Order Functions; title: Lazy Evaluation; title: Thinking Like a Functional Programmer; title: The Benefits of FP; title: FP Can Improve Productivity; title: FP Is Fun!; title: Scala; title: Conclusion; label: 2.
title: Mathematical Preliminaries; title: Set Theory; title: Functions; title: Kinds of Functions; title: Computer Science Fundamentals; title: Anonymous Functions; title: Functions as First Class Objects; title: Conclusion; label: 3.
title: Category Theory and Patterns; title: Category Theory–Based Patterns; title: A Brief History; title: Objects and Morphisms; title: An Example of a Category; title: The Category Scal; title: Functors; title: Programming Language Formulation of a Functor; title: The Patterns; title: The Functor Pattern; title: Monoids; title: Natural Transformations; title: Monads; title: Conclusion; label: 4.
title: Functional Data Structures; title: The Option Data Structure; title: The Try Data Structure; title: The Either Data Structure; title: Higher Order Functions; title: Monads in for Comprehensions in Scala; title: Traditional Data Structures; title: Immutability and History; title: Laziness; title: Conclusion; label: 5.
title: More on Immutability; title: Mutable and Immutable Variables; title: Recursion; title: A Linked List Example; title: Tail Recursion; title: More Examples of the Power of fold in Scala; title: A Connection Between fold and Monoids; title: More with Higher Order Functions; title: From map to flatMap; title: Conclusion; label: 6.
title: Questions of Concurrency; title: Streams; title: Akka Streams; title: Source; title: Flow; title: Sink; title: More on Streams; title: FS2: Functional Streams for Scala; title: Conclusion; label: 7.
title: Where to from Here?; title: Taking the Pure Route; title: The IO Monad; title: Taking the Middle Route; title: JVM Languages; title: .NET Languages; title: Type Classes; title: Conclusion; label: A.
title: Scala; title: Assumptions; title: Overview; title: var and val; title: Classes and Objects; title: Functions; title: Functions that Return Functions; title: Case Classes; title: Declaring Functions; title: Currying; title: Anonymous Functions; title: Higher Order Functions; title: Pattern Matching; title: Traits; title: Distinguishing Abstract Classes and Traits; title: Lazy Evaluation; title: Type Parameters; title: The Option Type; title: Future; title: Some Key Higher Order Functions; title: Some Other Important Higher Order Functions; title: Conclusion; title: Index; title: About the Author