All | Ikcamp Translation | JavaScript Lightweight Functional Programming | "JS you don't know" sister article

Source: Internet
Author: User
Tags creative commons attribution knowledge base

Original address: Functional-light-js

    • The original, Kyle Simpson-the author of You-dont-know-js

Team of translators (in no particular order): Axi, Blueken, Brucecham, Cfanlife, Dail, KYOKO-DF, L3ve, Lilins, Littlepineapple, Matildajin, Holly, Pobusama, Cherry, radish, vavd317, Vivaxy, Meng Meng, Zhouyao

About the translator: This is a pure project flowing with Hujiang blood: serious, is the most solid HTML pillars; sharing is the most dazzling glimpse of CSS, and summarizing it is the most rigorous logic in JavaScript. The Chinese version of the book was achieved through hammering and honing. This book contains the essence of functional programming, hoping to help you go more smoothly on the way to learning functional programming. than the heart.

This book explores the core ideas of functional programming [1] (FP). In this process, the author does not cling to the use of a large number of complex concepts to interpret, which is the special point of the book. What we're applying in JavaScript is just a subset of a basic set of functional programming concepts. I call it "lightweight functional Programming (FLP)."

Note: the word "lightweight" is used in the title, but this is not a "easy" entry-level book. The book is rigorous, filled with a variety of complex details, suitable for a solid JS knowledge base of readers to study. "Light weight" means that the range is reduced. In general, JavaScript books on functional programming are keen to broaden the reader's knowledge and attempt to reach more points of view. This book explores every topic in depth, even though it is small-scale.

Let's face it: Unless you're already part of a functional programming guru (at least I'm not!). ), it would be meaningless for us to say something like, "a list is just a semi-semigroup of the self-functor."

This is not to say that the complex and cumbersome concepts are meaningless , not to say that functional programmers misuse them. Once you have mastered the lightweight functional programming content, you will/may wish to have a more formal and systematic study of the various concepts of functional programming, and you will certainly have a deeper understanding of their meaning and causes.

But I want you to be able to apply some of the basics of functional programming to JavaScript programming now , because I believe it will help you write better, more logical code.

For more on the motives behind this book and the various viewpoints discussed, see [preface].

JavaScript Lightweight Functional Programming Directory
  • Introduction (by Brian Lonsdorf aka "Prof Frisby")
  • Objective
  • The 1th chapter: Why do you use functional programming? * Confidence * Communication channel * Readability curve * accept * you don't need it * resources
    * Recommended Books
    * Blogs and sites
    * Some libraries * Summary
  • 2nd Chapter: Function basis * What is a function?
    * A brief review of mathematics
    * Function vs Program * function input
    * Input Count
    * Function output that varies with input *
    * Return early
    * Output without return * Function function
    * Maintain scope * syntax
    * What is a name?
    * The function without functions * to say this? * Summary
  • 3rd: The input of the management function (Inputs) * Immediate and later pass parameters
    * Bind (..)
    * Reverse the argument order * pass one at a time
    * What is the use of curry and partial application?
    * How to curry multiple arguments?
    * Anti-Curry * As long as an argument
    * Send a return one
    * Constant Parameters * Extend the magic of the parameters in the parameter order of those things
    * Attribute extension * Intangible parameter style * Summary
  • 4th: Combining functions * output to input
    * Manufacturing Machines
    * Combinations of variants
    * General Combination
    * Different implementations * Reorder combinations * Abstract
    * Summarize the combination as an abstract * retrospective parameter *
  • 5th chapter: Reducing Side effects * What are side effects
    * Potential Causes
    * I/O effect
    * Other mistakes * just once.
    * Power in mathematics, etc.
    * Power in programming * pure pleasure
    * Relative pure * with or without
    * Transparency in thinking
    * Not transparent enough? * Purification
    * Closure of the impact
    * Coverage Effect
    * Avoidance Impact * Summary
  • 6th: Immutability of Values * Original value immutability * from value to value
    * Eliminate local Impact * Re-assign value
    * Intent
    * Freeze * Performance * View data in an immutable perspective * Summary
  • 7th: Closures vs Objects * reaching consensus * Similar
    * Status
    * Behavior, also the same!
    * (not) variable
    * Isomorphic * Same Root branch
    * Structural variability
    * Private
    * State Copy
    * Performance * Summary
  • 8th chapter: List Operations * Non-functional Programming list processing * mapping
    * Mapping vs Traversal
    * One word: functor * filter * Reduce
    * Map is also Reduce
    * Filter is also Reduce * Advanced List Operation * Method vs Standalone * search list * Dissolve * list * Summary
  • 9th: Recursion * Definition * Why recursive * declarative recursive * Refactoring recursive * Summary
  • 10th: Asynchronous Function * Time state * Positive vs lazy * responsive functional Programming * Summary
  • 11th Chapter: Mastery * Preparation * stock Information * Stock Quotes Interface * Summary
  • Appendix A:transducing
  • First, why
  • How to, Next
  • At last
  • Summarize
  • Appendix B: Humble Monad
  • Type
  • Loose interfaces
  • Maybe
  • Humble
  • Humility
  • Summarize
  • Appendix C: Function-type programming function library
  • Ramda (0.23.0)
  • LODASH/FP (4.17.4)
  • Mori (0.3.2)
  • Summarize
About Publishing

This book is published mainly on the Leanpub platform in the form of an electronic version. I also tried to sell a paper version of the book, but there was no definite plan.

In addition to buying this book, if you want to make some material donation to this book, please do it on the Patreon. The author of this book appreciates your generosity.

Patreon

Contributions

It is very welcome to contribute to any content of this book. However , please read contributions guidelines carefully before submitting the PR.

License & Copyright

All materials and contents of this book belong to (c) 2016-2017 Kyle Simpson.


This book is licensed under the creative Commons Attribution-noncommercial-noderivs 4.0 Unported License.

    1. FP, this book is referred to as functional programming.

    2. Fper, this book is collectively referred to as functional programmers.

P.s. Finishing good hard% "-%

All | Ikcamp Translation | JavaScript Lightweight Functional Programming | "JS you don't know" sister article

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.