Skip to Content
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
Explore Skills
Cloud Computing
Microsoft Azure
Amazon Web Services (AWS)
Google Cloud
Cloud Migration
Cloud Deployment
Cloud Platforms
Data Engineering
Data Warehouse
SQL
Apache Spark
Microsoft SQL Server
MySQL
Kafka
Data Lake
Streaming & Messaging
NoSQL Databases
Relational Databases
Data Science
Pandas
R
MATLAB
SAS
D3
Power BI
Tableau
Statistics
Exploratory Data Analysis
Data Visualization
AI & ML
Generative AI
Machine Learning
Artificial Intelligence (AI)
Deep Learning
Reinforcement Learning
Natural Language Processing
TensorFlow
Scikit-Learn
Hyperparameter Tuning
MLOps
Programming Languages
Java
JavaScript
Spring
Python
Go
C#
C++
C
Swift
Rust
Functional Programming
Software Architecture
Object-Oriented
Distributed Systems
Domain-Driven Design
Architectural Patterns
IT/Ops
Kubernetes
Docker
GitHub
Terraform
Continuous Delivery
Continuous Integration
Database Administration
Computer Networking
Operating Systems
IT Certifications
Security
Network Security
Application Security
Incident Response
Zero Trust Model
Disaster Recovery
Penetration Testing / Ethical Hacking
Governance
Malware
Security Architecture
Security Engineering
Security Certifications
Design
Web Design
Graphic Design
Interaction Design
Film & Video
User Experience (UX)
Design Process
Design Tools
Business
Agile
Project Management
Product Management
Marketing
Human Resources
Finance
Team Management
Business Strategy
Digital Transformation
Organizational Leadership
Soft Skills
Professional Communication
Emotional Intelligence
Presentation Skills
Innovation
Critical Thinking
Public Speaking
Collaboration
Personal Productivity
Confidence / Motivation
Features
All features
Verifiable skills
AI Academy
Courses
Certifications
Interactive learning
Live events
Superstreams
Answers
Insights reporting
Radar Blog
Buy Courses
Plans
Sign In
Try Now
O'Reilly Platform
book
React学习手册
by
Alex Banks
,
Eve Porcello
December 2017
Intermediate to advanced
329 pages
6h 9m
Chinese
China Electric Power Press Ltd.
Content preview from
React学习手册
33
第
3
章
JavaScript
函数式编程
当踏上
React
编程之旅时,你会发现函数式编程的概念随处可见。越来越多的
JavaScript
项目采用了函数式编程技术。
也许你已经在不假思索的情况下编写过
JavaScript
的函数式代码。如果曾经在一个数
组上调用过
map
或
reduce
方法,那么你已经在成为一名函数式程序员的道路上披荆斩
棘了。
React
、
Flux
和
Redux
都适用
JavaScript
的函数式编程范式。了解函数式编程的基
本概念将会有助于提高读者构建
React
应用的能力。
如果读者希望对函数式编程风格追根溯源,那么答案是
20
世纪
30
年代
lambda
演算或λ
演算的发明。
注
1
函数自
17
世纪诞生以来,一直是作为微积分的一部分而存在的。函数
可以作为函数的参数进行传递,还可以作为函数的执行结果被返回。更复杂的函数被
称为高阶函数,它可以精确地控制函数,既可以将函数当作参数传递,也可以将函数
作为执行结果返回,或者二者兼而有之。在
20
世纪
30
年代,
Alonzo Church
在普林斯
顿大学用高阶函数做实验时发明了
lambda
演算。
20
世纪
50
年代初,
John McCarthy
借鉴了λ
-
演算的概念,并将它应用到一门新的名为
Lisp
的编程语言上。
Lisp
实现了高阶函数的概念,并将函数作为第一类成员或者第一
类公民。一个函数被当作第一类成员时,它不仅可以被声明为一个变量,而且可以被
当作函数参数传递。这些函数甚至可以作为函数的执行结果被返回。
注
1
:
Data S. Scott
,“
λ
-Calculus: Then ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial
You might also like
React快速上手开发
Stoyan Stefanov
流畅的Python
Luciano Ramalho
C++语言导学(原书第2版)
本贾尼 斯特劳斯特鲁普
C++程序设计:原理与实践(基础篇)(原书第2版)
本贾尼 斯特劳斯特鲁普
Publisher Resources
ISBN: 9787519814236