好书推荐 好书速递 排行榜 读书文摘

Functional JavaScript

Functional JavaScript
作者:Michael Fogus
副标题:Introducing Functional Programming with Underscore.js
出版社:O'Reilly Media
出版年:2013-06
ISBN:9781449360726
行业:计算机
浏览数:50

内容简介

While some web developers dismiss JavaScript as a flawed language, this succinct book shows you how to make the best of it by practicing a functional style of JavaScript programming. Written by Michael Fogus - a core contributor to Clojure and ClojureScript, and author of The Joy of Clojure (Manning) - this book is packed with not only the how of functional programming, but also the why. Each topic illustrated with pointed examples. You'll also get a thorough reference to the Underscore.js library and its idioms, including: Closures Applicative programming Laziness Immutability Higher-order functions Purity Combinators Currying and partial application

......(更多)

作者简介

Michael Fogus

Michael Fogus is software developer with experience in distributedsimulation, machine vision, and expert systems construction. He's actively involved in the Clojure and Scala communities.

......(更多)

目录

Chapter 1 Introducing Functional JavaScript

The Case for JavaScript

Getting Started with Functional Programming

The Case for Underscore

Summary

Chapter 2 First-Class Functions and Applicative Programming

Functions as First-Class Things

Applicative Programming

Data Thinking

Summary

Chapter 3 Variable Scope and Closures

Global Scope

Lexical Scope

Dynamic Scope

Function Scope

Closures

Summary

Chapter 4 Higher-Order Functions

Functions That Take Other Functions

Functions That Return Other Functions

Putting It All Together: Object Validators

Summary

Chapter 5 Function-Building Functions

The Essence of Functional Composition

Currying

Partial Application

Stitching Functions End-to-End with Compose

Summary

Chapter 6 Recursion

Self-Absorbed Functions (Functions That Call Themselves)

Codependent Functions (Functions Calling Other Functions That Call Back)

Too Much Recursion!

Recursion Is a Low-Level Operation

Summary

Chapter 7 Purity, Immutability, and Policies for Change

Purity

Immutability

Policies for Controlling Change

Summary

Chapter 8 Flow-Based Programming

Chaining

Pipelining

Data Flow versus Control Flow

Summary

Chapter 9 Programming Without Class

Data Orientation

Mixins

}).call("Finis");

Appendix Functional JavaScript in the Wild

Functional Libraries for JavaScript

Functional Programming Languages Targeting JavaScript

Appendix Annotated Bibliography

Papers/Books/Blog Posts/Talks

Presentations

Blog Posts

Journal Articles

Colophon

......(更多)

读书文摘

object-oriented approach tends to break problems into groupings of “nouns,” or objects, a functional approach breaks the same problem into groupings of "verbs", or functions.

......(更多)

猜你喜欢

点击查看