Wrapping Up

In this chapter we looked at records and protocols. We saw how records are specialized maps. Like a map, a record lets you associate any key with any value. But records have an attitude. They know about a particular set of keys that they want to work with. We also saw how protocols are collections of functions that you can use to build polymorphic operations on your records.

You’ve now accumulated a lot of Clojure know-how. You can write code that generates functions on the fly and that puts data into collections and pulls it back out. Perhaps it’s time to talk about how you can make sure it’s all working.

Get Getting Clojure now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.