Leanpub Header

Skip to main content

Functional-Light JavaScript

Balanced, Pragmatic FP in JavaScript

A uniquely pragmatic approach to explaining core functional programming concepts WITHOUT wading through mathematical notation or heavy terminology.

This book is available in multiple packages!

Pick Your Package
PDF
EPUB
WEB
2,994
Readers
370
Pages
79,664Words
About

About

About the Book

This book explores the core principles of functional programming (FP) as they are applied to JavaScript. But what makes this book different is that we approach these principles without drowning in all the heavy terminology. We look at a subset of FP foundational concepts that I call "Functional-Light Programming" (FLP) and apply it to JavaScript.

Packages

Pick Your Package

All packages include the ebook in the following formats: PDF, EPUB, and Web

Book & Code

Minimum price

Suggested price$29.95

Includes the ebook and the code for Chapter 11 "Stock Ticker" example.

$26.95

  • Chapter 11 Example Code
    Code for the Chapter 11 "Stock Ticker" example project

5 Ebook License

Minimum price

Suggested price$124.95

5 licenses for the ebook, plus the Chapter 11 example code.

$109.95

  • Chapter 11 Example Code
    Code for the Chapter 11 "Stock Ticker" example project

This book is also available in the following packages:

  • 10 Ebook License

    10 licenses for the ebook, plus the Chapter 11 example code.

    • Chapter 11 Example Code
      Code for the Chapter 11 "Stock Ticker" example project
    Minimum price
    $199.95
    Suggested price
    $229.95

Author

About the Author

Kyle Simpson

Kyle Simpson is a web-oriented software engineer, widely acclaimed for his "You Don't Know JS" book series and nearly 1M hours viewed of his online courses. Kyle's superpower is asking better questions, who deeply believes in maximally using the minimally-necessary tools for any task. As a "human-centric technologist", he's passionate about bringing humans and technology together, evolving engineering organizations towards solving the right problems, in simpler ways. Kyle will always fight for the people behind the pixels.

Leanpub Podcast

Episode 166

An Interview with Kyle Simpson

Contents

Table of Contents

Foreword

Preface

  1. Mission

Chapter 1: Why Functional Programming?

  1. At a Glance
  2. Confidence
  3. Communication
  4. Readability
  5. Perspective
  6. How to Find Balance
  7. Resources
  8. Summary

Chapter 2: The Nature Of Functions

  1. What Is a Function?
  2. Function Input
  3. Note
  4. Tip
  5. Tip
  6. Named Arguments
  7. Tip
  8. Function Output
  9. Tip
  10. Note
  11. Functions of Functions
  12. Warning
  13. Note
  14. Tip
  15. Syntax
  16. Note
  17. What’s This?
  18. Note
  19. Note
  20. Summary

Chapter 3: Managing Function Inputs

  1. All for One
  2. Note
  3. Tip
  4. Warning
  5. Adapting Arguments to Parameters
  6. Note
  7. Note
  8. Some Now, Some Later
  9. Tip
  10. Note
  11. One at a Time
  12. Note
  13. Note
  14. Warning
  15. Order Matters
  16. Tip
  17. Tip
  18. Note
  19. No Points
  20. Warning
  21. Warning
  22. Note
  23. Summary

Chapter 4: Composing Functions

  1. Output to Input
  2. Note
  3. Note
  4. General Composition
  5. Warning
  6. Note
  7. Note
  8. Note
  9. Reordered Composition
  10. Abstraction
  11. Revisiting Points
  12. Note
  13. Tip
  14. Summary

Chapter 5: Reducing Side Effects

  1. Effects on the Side, Please
  2. Note
  3. Note
  4. Note
  5. Once Is Enough, Thanks
  6. Pure Bliss
  7. Note
  8. Note
  9. Note
  10. Note
  11. There or Not
  12. Purifying
  13. Note
  14. Warning
  15. Note
  16. Summary

Chapter 6: Value Immutability

  1. Primitive Immutability
  2. Value to Value
  3. Reassignment
  4. Performance
  5. Treatment
  6. Summary

Chapter 7: Closure vs. Object

  1. The Same Page
  2. Look Alike
  3. Note
  4. Two Roads Diverged in a Wood…
  5. Note
  6. Note
  7. Note
  8. Summary

Chapter 8: Recursion

  1. Definition
  2. Warning
  3. Note
  4. Note
  5. Declarative Recursion
  6. Tip
  7. Stack
  8. Note
  9. Note
  10. Rearranging Recursion
  11. Note
  12. Warning
  13. Summary

Chapter 9: List Operations

  1. Note
  2. Non-FP List Processing
  3. Map
  4. Note
  5. Note
  6. Filter
  7. Reduce
  8. Warning
  9. Note
  10. Note
  11. Advanced List Operations
  12. Note
  13. Note
  14. Note
  15. Note
  16. Note
  17. Tip
  18. Method vs. Standalone
  19. Note
  20. Note
  21. Looking for Lists
  22. Fusion
  23. Beyond Lists
  24. Note
  25. Note
  26. Note
  27. Summary

Chapter 10: Functional Async

  1. Time as State
  2. Eager vs. Lazy
  3. Note
  4. Reactive FP
  5. Note
  6. Note
  7. Note
  8. Summary
  9. Tip

Chapter 11: Putting It All Together

  1. Setup
  2. Note
  3. Note
  4. Stock Events
  5. Stock Ticker UI
  6. Note
  7. Summary

Appendix A: Transducing

  1. Why, First
  2. How, Next
  3. Note
  4. What, Finally
  5. Note
  6. Summary

Appendix B: The Humble Monad

  1. Type
  2. Loose Interface
  3. Just a Monad
  4. Note
  5. Maybe
  6. Note
  7. Humble
  8. Summary

Appendix C: FP Libraries

  1. Stuff to Investigate
  2. Ramda (0.23.0)
  3. Lodash/fp (4.17.4)
  4. Mori (0.3.2)
  5. Bonus: FPO
  6. Bonus #2: fasy
  7. Summary

Contributors

About the Contributors

Brian MacDonald

Brian Lonsdorf

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

About the Publisher

About the Publisher

This book is published on Leanpub by GetiPub

GetiPub helps aspiring authors with assisted self-publishing.

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub