Stuart Halloway1934356336, 9781934356333
Table of contents :
Contents……Page 7
Foreword……Page 10
Acknowledgments……Page 12
Preface……Page 14
What Is in This Book……Page 15
How to Read This Book……Page 16
Notation Conventions……Page 18
Web Resources and Feedback……Page 19
Downloading Sample Code……Page 20
Why Clojure?……Page 21
Clojure Coding Quick Start……Page 30
Exploring Clojure Libraries……Page 37
Introducing Lancet……Page 42
Wrapping Up……Page 44
Forms……Page 45
Reader Macros……Page 55
Functions……Page 56
Vars, Bindings, and Namespaces……Page 60
Flow Control……Page 67
Where’s My for Loop?……Page 70
Metadata……Page 74
Wrapping Up……Page 77
Working with Java……Page 79
Calling Java……Page 80
Optimizing for Performance……Page 88
Creating and Compiling Java Classes in Clojure……Page 94
Exception Handling……Page 101
Adding Ant Projects and Tasks to Lancet……Page 105
Wrapping Up……Page 110
Unifying Data with Sequences……Page 111
Everything Is a Sequence……Page 112
Using the Sequence Library……Page 117
Lazy and Infinite Sequences……Page 125
Clojure Makes Java Seq-able……Page 127
Calling Structure-Specific Functions……Page 133
Adding Properties to Lancet Tasks……Page 141
Wrapping Up……Page 146
Functional Programming……Page 147
Functional Programming Concepts……Page 148
How to Be Lazy……Page 152
Lazier Than Lazy……Page 160
Recursion Revisited……Page 167
Wrapping Up……Page 176
Concurrency……Page 177
The Problem with Locks……Page 178
Refs and Software Transactional Memory……Page 179
Use Atoms for Uncoordinated, Synchronous Updates……Page 186
Use Agents for Asynchronous Updates……Page 187
Managing Per-Thread State with Vars……Page 192
A Clojure Snake……Page 196
Making Lancet Targets Run Only Once……Page 207
Wrapping Up……Page 210
When to Use Macros……Page 211
Writing a Control Flow Macro……Page 212
Making Macros Simpler……Page 218
Taxonomy of Macros……Page 224
Making a Lancet DSL……Page 233
Wrapping Up……Page 243
Multimethods……Page 244
Living Without Multimethods……Page 245
Defining Multimethods……Page 247
Moving Beyond Simple Dispatch……Page 249
Creating Ad Hoc Taxonomies……Page 251
When Should I Use Multimethods?……Page 255
Adding Type Coercions to Lancet……Page 259
Wrapping Up……Page 264
Clojure in the Wild……Page 265
Automating Tests……Page 266
Data Access……Page 270
Web Development……Page 275
Farewell……Page 283
Editor Support……Page 284
Bibliography……Page 285
B……Page 286
C……Page 287
F……Page 288
I……Page 289
L……Page 290
O……Page 291
R……Page 292
S……Page 293
W……Page 294
Z……Page 295
Reviews
There are no reviews yet.