Clojure Program Design

Source: Internet
Author: User

Clojure Programming
Basic Information
Author: (US) Stuart Halloway Aaron bedra [Translator's introduction]
Press: People's post and telecommunications Press
ISBN: 9787115308474
Mounting time:
Published on: February 1, March 2013
Start: 16
Page number: 230
Version: 1-1
Category: Computer> Software and programming> JAVA (J #)> JAVA

For more information, clojure Programming
Introduction
Computer books
Clojure is a dynamic programming language based on Java virtual machines. It is powerful, supports functional programming, simplifies concurrent programming, and can call Java programs. These advantages have won the favor of many programmers.
This book is a classic introduction to clojure programming language and programming. Version 2nd is fully updated for clojure 1.3. The book consists of 10 chapters, which respectively introduce clojure overview and basic features, sequence and function programming, concurrent programming model, protocol and data type, macros, and multiple methods, and clojure's call to Java. Finally, an instance is provided to fully understand the entire process of clojure application development.
Clojure programming is suitable for programmers who want to learn and understand clojure programming with different language backgrounds. Function programmers, Java and C # programmers, LISP programmers, and Perl, Python, and Ruby programmers can read this book to varying degrees.
Directory
Clojure Programming
Chapter 1 sailing 1
1.1 why is clojure 2
1.1.1 clojure is very elegant 2
1.1.2 clojure is the re-emergence of Lisp 5
1.1.3 why is it lisp 5
1.1.4 it is LISP, but 6 fewer parentheses
1.1.5 clojure is a functional language 8
1.1.6 clojure simplifies concurrent programming 9
1.1.7 clojure and Java virtual machines are close to each other 10
1.2 clojure programming Quick Start 11
1.2.1 use repl 12
1.2.2 Special variable 13
1.2.3 add sharing status 14
1.3 explore clojure library 16
1.3.1 require and use 17
1.3.2 search for document 18
1.4 conclusion 20
Chapter 2 explore clojure 21
2.1 Form 21
. 2.1.1 use the value type 22
2.1.2 symbol 24
2.1.3 string and character 25
2.1.4 Boolean value and nil 27
2.1.5 ing tables, keywords, and records 28
2.2 reader macro 30
2.3 function 32
2.3.1 anonymous function 34
2.3.2 when to use anonymous functions 36
2.4 variables, bindings, and namespaces 36
2.4.1 bind 37
2.4.2 deconstruct 38
2.4.3 namespace 40
2.5 call Java 43
2.5.1 Access constructors, methods, and fields 43
2.5.2 javadoc 45
2.6 process control 45
2.6.1 branch structure and if 45
2.6.2 using do to introduce side effects 46
2.6.3 loop and loop/recur 47
2.7 where did my for loop go 48?
2.8 metadata 52
2.9 summary 53
Chapter 1 everything is in sequence 55
3.1 All sequences 56
3.2 use sequence database 61
3.2.1 create sequence 61
3.2.2 filter sequence 64
3.2.3 sequence predicates 65
3.2.4 sequence conversion 66
3.3 inertia and infinite sequence 69
3.4 Java can also be sorted 71
3.4.1 sequential Java container 71
3.4.2 ordinal Regular Expression 73
3.4.3 sequential file system 74
3.4.4 Sequential stream 75
3.4.5 sequential XML 76
3.5 call a structure-specific function 77
3.5.1 list function 77
3.5.2 vector function 78
3.5.3 ing table function 79
3.5.4 set functions 82
3.6 summary 85
Chapter 1 functional programming 86
4.1 Functional Programming philosophy 86
4.1.1 pure function 87
4.1.2 persistent data structure 87
4.1.3 inertia and Recursion 88
4.1.4 reference transparency 89
4.1.5 FP advantage 89
4.1.6 6 rules 90
4.2 how to steal a lazy 91
4.2.1 tail recursion 92
4.2.2 self-recursion and recur 94
4.2.3 inert sequence 95
4.2.4 about monetization 97
4.2.5 discard Header element 98
4.3 lazy + lazy 99
4.4 recurrence 105
4.4.1 convert to self-recursion 106
4.4.2 using trampolining technology 107
4.4.3 use inertia instead of recursion 109
4.4.4 use saved records as recursion to copy a nearline 112
4.5 Conclusion 114
Chapter 2 status 5th
5.1 concurrent, concurrent, and locked 116
5.2 Reference and soft transaction memory 117
5.2.1 ref-set 118
5.2.2 transaction attribute 118
5.2.3 alter 119
5.2.4 how STM works: MVCC 120
5.2.5 commute 121
5.2.6 alter first 122
5.2.7 add verification 123 for Reference
5.3 update non-collaborative and synchronous with atoms 124
5.4 use proxy for asynchronous update 125
5.4.1 proxy verification and error handling 126
5.4.2 include proxy 127 in the transaction
5.4.3 unified update model 129
5.5 use variables to manage the status within the thread 129
5.5.1 remote function 131
5.5.2 Java callback API 132
5.6 clojure snake 134
5.6.1 functional model 135
5.6.2 use STM to create a variable model 139
5.6.3 snake GUI 140
5.6.4 no reference of snake 143
5.7 conclusion 144
Chapter 4 protocol and Data Type 6th
6.1 abstract programming 145
6.2 interface 148
6.3 protocol 149
6.4 data type 153
6.5 records 158
6.6 specific 164
6.7 Conclusion 165
Chapter 2 macro 7th
7.1 When to use macro 166
7.2 write process control macro 167
7.2.1 special forms, design patterns and macros 169
7.2.2 macro expansion 170
7.2.3 The when and when-not 172
7.3 making macros simpler 173
7.3.1 syntax quote, quote, and quote merging 175
7.3.2 create a name 176 in the macro
7.4 macro classification 178
7.4.1 conditional evaluation of 180
7.4.2 create variable 181
7.4.3 Java interoperability 183
7.4.4 latency 184
7.4.5 package the evaluation value 184
7.4.6 avoid lambda expressions 186
7.5 conclusion 187
Chapter 1 multiple methods 8th
8.1 days without multiple methods 188
8.2 define multiple methods 190
8.2.1 scheduling is an inherited 192.
8.2.2 default value of multiple methods: 192
8.3 scheduling is not simple 193
8.4 create a special category 195
8.5 when should I use multiple Methods 199
8.5.1 inspector 200
8.5.2 clojure. Test 201
8.5.3 counterexample 202
8.6 conclusion 203
Chapter 2 best practices of Java 9th
9.1 Exception Handling 205
9.1.1 keep simple Exception Handling 205
9.1.2 clear resource 206
9.1.3 response error 207
9.2 fight with integer 209
9.3 performance optimization 210
9.3.1 use basic types to improve performance by 210
9.3.2 Add a type prompt 213
9.4 create a Java class 215 in clojure
9.4.1 create a Java proxy 215
9.4.2 use Java container 217
9.5 real-world example 220
9.5.1 true continuous cycle 222
9.5.2 log 224
9.5.3 configure 226
9.6 conclusion 227
Chapter 2 Application construction 10th
10.1 score 229 for an electronic interpreter game
10.2 test the splitter 232
10.2.1 manual Construction Input 233
10.2.2 run test 234
10.2.3 verify output 235
10.2.4 regression test 236
10.3 test. generative 237
10.3.1 generate 237 data
10.3.2 programmatic verification 238
10.3.3 defspec 240
10.3.4 run test 241
10.3.5 when the specification fails to be executed 242
10.3.6 Generate Test of scoring function 243
10.4 create user interface 244
10.4.1 The processing status is 245.
10.4.2 player interface 246
10.5 deployment code 249
10.5.1 procfile 250
10.5.2 Heroku database 250
10.5.3 git 251
10.5.4 place your application 251
10.5.5 deployment 252
10.6 conclusion 252
Exhibit editor 254
Bibliography 255

Source of this book: China Interactive publishing network

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.