
Автор: Alex Miller, Lorilyn Jordan Miller
Издательство: Pragmatic Bookshelf
Год: February 2025 (Version: P1.0)
Страниц: 127
Язык: английский
Формат: pdf, epub, mobi
Размер: 10.1 MB
Challenge your knowledge of Clojure with 25 short Clojure teasers, sometimes with surprising results! Inspired by years of developer questions and feedback, these teasers are handpicked to clarify common points of confusion. Each code challenge illustrates Clojure's elegant design, explaining how and why it works. Enjoy these simple exercises solo or with friends to find gaps in your knowledge, challenge assumptions, and gain valuable insights. Tackle the most common points of confusion Clojure developers encounter, become more efficient when writing and debugging, and better predict the outcomes of Clojure code. Regardless of your Clojure experience, you're certain to learn something new.
Clojure was designed to be a general-purpose functional language with a simple programming model for information systems (far simpler than the object-oriented models that dominate the industry). Many people have commented that aspects of Clojure, like immutable collections, functional programming, state management, concurrency, and open polymorphism, seem to fit together and support each other at a surprisingly deep level. Indeed, this is a consequence of the intense design effort that went into Clojure’s initial creation and the attention the core team pays to design with every new feature.
Additionally, Clojure is, by design, a hosted language, running on top of some other runtime, like the JVM, jаvascript, or the Microsoft CLR. Being hosted gives Clojure a huge advantage in library availability and integration with existing systems but also invites situations where Clojure and host semantics may differ.
You know Clojure, but do you really understand it? You may know the mechanics and idioms, but what about the deeper, implicit concepts driving the design? Discover and explore the real Clojure, testing and supplementing your understanding of why this data-driven functional programming language works the way it does.
You'll start with the basic concepts such as numeric types, numeric promotion, and logical truth. But the backbone of Clojure is its focus on immutable data, centered around the Clojure collections. Learn about collection equality, polymorphism on nil, adding and finding elements in different collection types, and sorted collections. Explore Clojure's evaluation model, including the Clojure reader, quoting, evaluation, and macro expansion. Finally, learn about the core library functions like "case", "concat", "for", "partial", and the details of type hinting, vars, and destructuring. Understand the peculiarities of these functions and how to apply them to your advantage in future programs.
Use these new insights to build your own concise, expressive, and flexible code. Don't just use Clojure, master it.
What You Need:
Java 8 or higher
Clojure 1.11 or higher
This book assumes some basic familiarity with Clojure and its features. If you are completely new to Clojure, we suggest that you pause each time you encounter something new and read about it in your favorite Clojure introductory text or online resource. Because the topics are presented here example-first, you may find that they form a complementary path to learning.
Скачать Clojure Brain Teasers: Exercise Your Mind
