
Programming Clojure
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
Drowning in unnecessary complexity, unmanaged state, and tangles of spaghetti code? In the best tradition of Lisp, Clojure gets out of your way so you can focus on expressing simple solutions to hard problems. Clojure cuts through complexity by providing a set of composable tools--immutable data, functions, macros, and the interactive REPL. Written by members of the Clojure core team, this book is the essential, definitive guide to Clojure. This new edition includes information on all the newest features of Clojure, such as transducers and specs.
Clojure joins the flexibility and agility of Lisp with the reach, stability, and performance of Java. Combine Clojure's tools for maximum effectiveness as you work with immutable data, functional programming, and safe concurrency to write programs that solve real-world problems.
Start by reading and understanding Clojure syntax and see how Clojure is evaluated. From there, find out about the sequence abstraction, which combines immutable collections with functional programming to create truly reusable data transformation code. Clojure is a functional language; learn how to write programs in a functional style, and when and how to use recursion to your advantage. Discover Clojure's unique approach to state and identity, techniques for polymorphism and open systems using multimethods and protocols, and how to leverage Clojure's metaprogramming capabilities via macros. Finally, put all the pieces together in a real program.
New to this edition is coverage of Clojure's spec library, one of the most interesting new features of Clojure for describing both data and functions. You can use Clojure spec to validate data, destructure data, explain invalid data, and generate large numbers of tests to verify the correctness of your code.
With this book, you'll learn how to think in Clojure, and how to take advantage of its combined strengths to build powerful programs quickly.
What You Need:
- Java 6 or higher
- Clojure 1.9
More details
Other editions
Additional editions

Person
Alex Miller was about to give up on programming as irretrievably complex when he found Clojure, which renewed his love for code. Alex works by day on improving Clojure and spends his off hours organizing the Strange Loop conference and playing music with his kids.
Content
- Intro
- Programming Clojure, Third Editio n
- About the Pragmatic Bookshelf
- Table of Contents
- Early praise for Programming Clojure, Third Edition
- Acknowledgments
- Introduction
- Who This Book Is For
- What's in This Book
- How to Read This Book
- Notation Conventions
- Web Resources and Feedback
- Downloading Sample Code
- Chapter 1: Getting Started
- Simplicity and Power in Action
- Clojure Coding Quick Start
- Navigating Clojure Librar ies
- Wrapping Up
- Chapter 2: Exploring Clojure
- Reading Clojure
- Functions
- Vars, Bindings, and Namespace s
- Metadata
- Calling Java
- Comments
- Flow Control
- Where's My for Loop?
- Wrapping Up
- Chapter 3: Unifying Data with Sequences
- Everything Is a Sequence
- Using the Sequence Library
- Lazy and Infinite Sequences
- Clojure Makes Java Seq-abl e
- Calling Structure-Specif ic Functions
- Wrapping Up
- Chapter 4: Functional Programming
- Functional Programmin g Concepts
- How to Be Lazy
- Lazier Than Lazy
- Recursion Revisited
- Eager Transformations
- Wrapping Up
- Chapter 5: Specifications
- Defining Specs
- Validating Data
- Validating Functions
- Generative Function Testing
- Wrapping Up
- Chapter 6: State and Concurrency
- Concurrency, Parallelism, and L ocking
- Refs and Software Trans actional Memory
- Use Atoms for Uncoordinated, Synchronous Upda tes
- Use Agents for Asynchronous Updates
- Managing Per-Thread State with Vars
- A Clojure Snake
- Wrapping Up
- Chapter 7: Protocols and Datatypes
- Programming to Abstractions
- Interfaces
- Protocols
- Datatypes
- Records
- reify
- Wrapping Up
- Chapter 8: Macros
- When to Use Macros
- Writing a Control Flow Mac ro
- Making Macros Simpler
- Taxonomy of Macros
- Wrapping Up
- Chapter 9: Multimethods
- Living Without Multimetho ds
- Defining Multimethods
- Moving Beyond Simple Dispatch
- Creating Ad Hoc Taxonomies
- When Should I Use Multim ethods?
- Wrapping Up
- Chapter 10: Java Interop
- Creating Java Objects in Clojure
- Calling Clojure From Java
- Exception Handling
- Optimizing for Performance
- A Real-World Example
- Wrapping Up
- Chapter 11: Building an Application
- Getting Started
- Developing the Game Loop
- Representing Progress
- Implementing Players
- Interactive Play
- Documenting and Testing Your Game
- Farewell
- Bibliography
- You May Be Interested In.
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.