点此搜书

函数式编程思想  英文
  • 作 者:(美)弗德著
  • 出 版 社:南京:东南大学出版社
  • 出版年份:2015
  • ISBN:9787564153885
  • 标注页数:168 页
  • PDF页数:180 页
  • 请阅读订购服务说明与试读!

文档类型

价格(积分)

购买连接

试读

PDF格式

8

立即购买

点击试读

订购服务说明

1、本站所有的书默认都是PDF格式,该格式图书只能阅读和打印,不能再次编辑。

2、除分上下册或者多册的情况下,一般PDF页数一定要大于标注页数才建议下单购买。【本资源180 ≥168页】

图书下载及付费说明

1、所有的电子图书为PDF格式,支持电脑、手机、平板等各类电子设备阅读;可以任意拷贝文件到不同的阅读设备里进行阅读。

2、电子图书在提交订单后一般半小时内处理完成,最晚48小时内处理完成。(非工作日购买会延迟)

3、所有的电子图书都是原书直接扫描方式制作而成。

1.Why 1

Shifting Paradigms 2

Aligning with Language Trends 4

Ceding Control to the Language/Runtime 4

Concision 5

2.Shift 11

A Common Example 11

Imperative Processing 11

Functional Processing 12

Case Study:Number Classification 17

Imperative Number Classification 17

Slightly More Functional Number Classification 19

Java 8 Number Classifier 21

Functional Java Number Classifier 22

Common Building Blocks 24

Filter 24

Map 25

Fold/Reduce 29

Synonym Suffering 31

Filter 31

Map 34

Fold/Reduce 36

3.Cede 39

Iteration to Higher-Order Functions 39

Closures 40

Currying and Partial Application 44

Definitions and Distinctions 44

In Groovy 45

In Clojure 47

Scala 47

Common Uses 51

Recursion 52

Seeing Lists Differently 52

Streams and Work Reordering 56

4.Smarter,Not Harder 59

Memoization 59

Caching 60

Adding Memoization 63

Laziness 70

Lazy Iterator in Java 70

Totally Lazy Number Classifier 72

Lazy Lists in Groovy 74

Building a Lazy List 77

Benefits of Laziness 80

Lazy Field Initialization 82

5.Evolve 83

Few Data Structures,Many Operations 83

Bending the Language Toward the Problem 85

Rethinking Dispatch 86

Improving Dispatch with Groovy 86

Clojure's"Bendable"Language 87

Clojure Multimethods and a la carte Polymorphism 89

Operator Overloading 91

Groovy 91

Scala 93

Functional Data Structures 95

Functional Error Handling 96

The Either Class 97

The Option Class 105

Either Trees and Pattern Matching 106

6.Advance 113

Design Patterns in Functional Languages 113

Function-Level Reuse 114

Template Method 116

Strategy 118

The Flyweight Design Pattern and Memoization 119

Factory and Currying 122

Structural Versus Functional Reuse 124

Code Reuse Via Structure 124

7.Practical Thinking 133

Java 8 133

Functional Interfaces 135

Optional 136

Java 8 Streams 136

Functional Infrastructure 137

Architecture 137

Web Frameworks 141

Databases 142

8.Polyglot and Polyparadigm 145

Combining Functional with Metaprogramming 146

Mapping Data Types with Metaprogramming 147

Infinite Streams with Functional Java and Groovy 148

Consequences of Multiparadigm Languages 150

Context Versus Composition 151

Functional Pyramid 154

Index 159

购买PDF格式(8分)
返回顶部