Book description
Discover the power of functional programming, lazy evaluation, monads, concurrency, and immutability to create succinct and expressive implementations
Key Features
- Get a solid understanding of how to apply functional programming concepts in TypeScript
- Explore TypeScript runtime features such as event loop, closures, and Prototypes
- Gain deeper knowledge on the pros and cons of TypeScript
Book Description
Functional programming is a powerful programming paradigm that can help you to write better code. However, learning functional programming can be complicated, and the existing literature is often too complex for beginners. This book is an approachable introduction to functional programming and reactive programming with TypeScript for readers without previous experience in functional programming with JavaScript, TypeScript , or any other programming language.
The book will help you understand the pros, cons, and core principles of functional programming in TypeScript. It will explain higher order functions, referential transparency, functional composition, and monads with the help of effective code examples. Using TypeScript as a functional programming language, you'll also be able to brush up on your knowledge of applying functional programming techniques, including currying, laziness, and immutability, to real-world scenarios.
By the end of this book, you will be confident when it comes to using core functional and reactive programming techniques to help you build effective applications with TypeScript.
What you will learn
- Understand the pros and cons of functional programming
- Delve into the principles, patterns, and best practices of functional and reactive programming
- Use lazy evaluation to improve the performance of applications
- Explore functional optics with Ramda
- Gain insights into category theory functional data structures such as Functors and Monads
- Use functions as values, so that they can be passed as arguments to other functions
Who this book is for
This book is designed for readers with no prior experience of functional programming with JavaScript, TypeScript or any other programming language. Some familiarity with TypeScript and web development is a must to grasp the concepts in the book easily.
Table of contents
- Title Page
- Copyright and Credits
- Dedication
- About Packt
- Foreword
- Contributors
- Preface
-
Functional Programming Fundamentals
- Is TypeScript a functional programming language?
- The benefits of functional programming
- Introducing functional programming
- Pure functions
- side-effects
- Referential transparency
- Stateless versus stateful
- Declarative versus imperative programming
- Immutability
- Functions as first-class citizens
- Lambda expressions
- Function arity
- Higher-order functions
- Laziness
- Summary
- Mastering Functions
- Mastering Asynchronous Programming
- The Runtime – The Event Loop and the this Operator
- The Runtime – Closures and Prototypes
- Functional Programming Techniques
- Category Theory
- Immutability, Optics, and Laziness
- Functional-Reactive Programming
- Real-World Functional Programming
- Functional Programming Learning Road Map
- Directory of TypeScript Functional Programming Libraries
- Other Books You May Enjoy
Product information
- Title: Hands-On Functional Programming with TypeScript
- Author(s):
- Release date: January 2019
- Publisher(s): Packt Publishing
- ISBN: 9781788831437
You might also like
book
Functional Programming in JavaScript
Functional Programming in JavaScript teaches JavaScript developers functional techniques that will improve extensibility, modularity, reusability, testability, …
book
Functional Programming in Kotlin
Master techniques and concepts of functional programming to deliver safer, simpler, and more effective Kotlin code. …
book
Refactoring TypeScript
Discover various techniques to develop maintainable code and keep it in shape. Key Features Learn all …
book
Functional Programming with C#
After decades of relative obscurity, functional programming is finally coming into its own. With concise, easy-to-read …