Functional Programming in JavaScript

Unlock the powers of functional programming hidden within JavaScript to build smarter, cleaner, and more reliable web apps

Functional Programming in JavaScript

This ebook is included in a Mapt subscription
Dan Mantyla

4 customer reviews
Unlock the powers of functional programming hidden within JavaScript to build smarter, cleaner, and more reliable web apps
$0.00
$23.99
$29.99
$39.99p/m after trial
RRP $23.99
RRP $29.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 4,000+ eBooks & Videos
  • 40+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781784398224
Paperback172 pages

Book Description

This is a fast-paced guide that will help you to write real-world applications by utilizing a wide range of functional techniques and styles.

The book first explores the core concepts of functional programming common to all functional languages, with examples of their use in JavaScript. It's followed by a comprehensive roundup of functional programming libraries for JavaScript that minimizes the burden of digging deep into JavaScript to expose a set of tools that makes functional programming not just possible but highly convenient. The book then rounds off with an overview of methods to effectively use and mix functional programming with object-oriented programming.

Table of Contents

Chapter 1: The Powers of JavaScript's Functional Side – a Demonstration
Introduction
The demonstration
The application – an e-commerce website
Functional programming
Summary
Chapter 2: Fundamentals of Functional Programming
Functional programming languages
Working with functions
The functional programmer's toolkit
Summary
Chapter 3: Setting Up the Functional Programming Environment
Introduction
Functional libraries for JavaScript
Development and production environments
Summary
Chapter 4: Implementing Functional Programming Techniques in JavaScript
Partial function application and currying
Function composition
Mostly functional programming
Functional reactive programming
Summary
Chapter 5: Category Theory
Category theory
Functors
Monads
Implementing categories
Summary
Chapter 6: Advanced Topics and Pitfalls in JavaScript
Recursion
Variable scope
Function declarations versus function expressions versus the function constructor
Summary
Chapter 7: Functional and Object-oriented Programming in JavaScript
JavaScript – the multi-paradigm language
JavaScript's object-oriented implementation – using prototypes
Mixing functional and object-oriented programming in JavaScript
Summary

What You Will Learn

  • Separate core logic from the program state to write more maintainable code
  • Replace ugly for loops with pure functions and recursion
  • Simplify code with method chains of pure, higher-order functions
  • Create more reliable code with closures and immutable data
  • Explore lazy evaluation strategies and what they can accomplish
  • Develop more powerful applications with currying and function composition
  • Use promises, functors, monads, and function factories

Authors

Table of Contents

Chapter 1: The Powers of JavaScript's Functional Side – a Demonstration
Introduction
The demonstration
The application – an e-commerce website
Functional programming
Summary
Chapter 2: Fundamentals of Functional Programming
Functional programming languages
Working with functions
The functional programmer's toolkit
Summary
Chapter 3: Setting Up the Functional Programming Environment
Introduction
Functional libraries for JavaScript
Development and production environments
Summary
Chapter 4: Implementing Functional Programming Techniques in JavaScript
Partial function application and currying
Function composition
Mostly functional programming
Functional reactive programming
Summary
Chapter 5: Category Theory
Category theory
Functors
Monads
Implementing categories
Summary
Chapter 6: Advanced Topics and Pitfalls in JavaScript
Recursion
Variable scope
Function declarations versus function expressions versus the function constructor
Summary
Chapter 7: Functional and Object-oriented Programming in JavaScript
JavaScript – the multi-paradigm language
JavaScript's object-oriented implementation – using prototypes
Mixing functional and object-oriented programming in JavaScript
Summary

Book Details

ISBN 139781784398224
Paperback172 pages
Read More
From 4 reviews

Read More Reviews