Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Clojure Polymorphism
  • Table Of Contents Toc
Clojure Polymorphism

Clojure Polymorphism

By : Paul Stadig
close
close
Clojure Polymorphism

Clojure Polymorphism

By: Paul Stadig

Overview of this book

Clojure is a modern, dynamic language that you can use to develop robust, multithreaded programs. Clojure Polymorphism is a comprehensive guide that shows you how to use Clojure’s features to your advantage. The book begins by describing examples that show how to define and implement abstractions with plain functions and multimethods. Then you'll analyze these examples and separate the good and bad aspects of their design principles. You'll also learn how to perform data transformation abstraction with a plain function and discover how to write new cross-platform predicates while keeping the core of your abstraction free from reader conditionals. The later chapters explain the considerations to keep in mind when implementing Clojure protocols on the Java Virtual Machine (JVM). By the end of this book, you’ll know how to use the various polymorphic tools of Clojure to your advantage while designing your applications.
Table of Contents (7 chapters)
close
close

Data Transformation

The reality of professional programming is that most of the job is about data transformation. This necessary function often cries out for an abstraction. For example, if you create or consume a web service, chances are you will need to convert Clojure data to JSON data.

I could implement a data transformation abstraction with a plain function:

1 (ns stadig.json)
2
3 (defn convert
4   [obj]
5   (cond
6     (string? obj) obj
7     (map? obj) (str (reduce-kv (fn [s k v]
8                                  (str s (convert k) " : " (convert v) " "))
9                      ...
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Clojure Polymorphism
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon