Mastering Clojure

Understand the philosophy of the Clojure language and dive into its inner workings to unlock its advanced features, methodologies, and constructs

Mastering Clojure

This ebook is included in a Mapt subscription
Akhil Wali

1 customer reviews
Understand the philosophy of the Clojure language and dive into its inner workings to unlock its advanced features, methodologies, and constructs
$0.00
$20.00
$49.99
$29.99p/m after trial
RRP $39.99
RRP $49.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 4,000+ eBooks & Videos
  • 40+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781785889745
Paperback266 pages

Book Description

Clojure is a general-purpose language from the Lisp family with an emphasis on functional programming. It has some interesting concepts and features such as immutability, gradual typing, thread-safe concurrency primitives, and macro-based metaprogramming, which makes it a great choice to create modern, performant, and scalable applications.

Mastering Clojure gives you an insight into the nitty-gritty details and more advanced features of the Clojure programming language to create more scalable, maintainable, and elegant applications. You’ll start off by learning the details of sequences, concurrency primitives, and macros. Packed with a lot of examples, you’ll get a walkthrough on orchestrating concurrency and parallelism, which will help you understand Clojure reducers, and we’ll walk through composing transducers so you know about functional composition and process transformation inside out. We also explain how reducers and transducers can be used to handle data in a more performant manner.

Later on, we describe how Clojure also supports other programming paradigms such as pure functional programming and logic programming. Furthermore, you’ll level up your skills by taking advantage of Clojure's powerful macro system. Parallel, asynchronous, and reactive programming techniques are also described in detail.

Lastly, we’ll show you how to test and troubleshoot your code to speed up your development cycles and allow you to deploy the code faster.

Table of Contents

Chapter 1: Working with Sequences and Patterns
Defining recursive functions
Thinking in sequences
Working with pattern matching
Summary
Chapter 2: Orchestrating Concurrency and Parallelism
Managing concurrent tasks
Managing state
Executing tasks in parallel
Summary
Chapter 3: Parallelization Using Reducers
Using reduce to transform collections
Using fold to parallelize collections
Processing data with reducers
Summary
Chapter 4: Metaprogramming with Macros
Understanding the reader
Reading and evaluating code
Quoting and unquoting code
Transforming code
Summary
Chapter 5: Composing Transducers
Understanding transducers
Comparing transducers and reducers
Transducers in action
Summary
Chapter 6: Exploring Category Theory
Demystifying category theory
Using monoids
Using functors
Using applicative functors
Using monads
Summary
Chapter 7: Programming with Logic
Diving into logic programming
Thinking in logical relations
Summary
Chapter 8: Leveraging Asynchronous Tasks
Using channels
Using actors
Summary
Chapter 9: Reactive Programming
Reactive programming with fibers and dataflow variables
Using Reactive Extensions
Using functional reactive programming
Building reactive user interfaces
Introducing Om
Summary
Chapter 10: Testing Your Code
Writing tests
Testing with specs
Generative testing
Testing with types
Summary
Chapter 11: Troubleshooting and Best Practices
Debugging your code
Logging errors in your application
Thinking in Clojure
Summary

What You Will Learn

  • Maximize the impact of parallelization, functional composition, and process transformation by composing reducers and transducers
  • Process and manipulate data using sequences, reducers, and transducers in Clojure
  • Modify and add features to the Clojure language using macros
  • Explore the features of category theory and custom data sources for logic programming in Clojure
  • Orchestrate parallelism and concurrency using built-in primitives as well as community libraries in Clojure
  • Handle data with asynchronous and reactive programming methodologies and leverage it using the core.async library
  • Test your code with unit tests, specs, and type checks to write testable code
  • Troubleshoot and style your Clojure code to make it more maintainable

Authors

Table of Contents

Chapter 1: Working with Sequences and Patterns
Defining recursive functions
Thinking in sequences
Working with pattern matching
Summary
Chapter 2: Orchestrating Concurrency and Parallelism
Managing concurrent tasks
Managing state
Executing tasks in parallel
Summary
Chapter 3: Parallelization Using Reducers
Using reduce to transform collections
Using fold to parallelize collections
Processing data with reducers
Summary
Chapter 4: Metaprogramming with Macros
Understanding the reader
Reading and evaluating code
Quoting and unquoting code
Transforming code
Summary
Chapter 5: Composing Transducers
Understanding transducers
Comparing transducers and reducers
Transducers in action
Summary
Chapter 6: Exploring Category Theory
Demystifying category theory
Using monoids
Using functors
Using applicative functors
Using monads
Summary
Chapter 7: Programming with Logic
Diving into logic programming
Thinking in logical relations
Summary
Chapter 8: Leveraging Asynchronous Tasks
Using channels
Using actors
Summary
Chapter 9: Reactive Programming
Reactive programming with fibers and dataflow variables
Using Reactive Extensions
Using functional reactive programming
Building reactive user interfaces
Introducing Om
Summary
Chapter 10: Testing Your Code
Writing tests
Testing with specs
Generative testing
Testing with types
Summary
Chapter 11: Troubleshooting and Best Practices
Debugging your code
Logging errors in your application
Thinking in Clojure
Summary

Book Details

ISBN 139781785889745
Paperback266 pages
Read More
From 1 reviews

Read More Reviews