You are previewing Clojure in Action.

Clojure in Action

Cover of Clojure in Action by Amit Rathore Published by Manning Publications

Chapter 13. More on functional programming


This chapter covers

  • A refresher on higher-order functions
  • Partial application and currying of functions
  • Lexical closures
  • Traditional object-oriented programming in Clojure


So far, you’ve seen a lot of the Clojure programming language, and you’ve used it to write programs that can access data stores, communicate on message queues, consume and provide you services, crunch large amounts of data, and more. In this chapter, we’ll revisit a fundamental concept of Clojure—that of functional programming.

Instead of approaching this from, say, a mathematical (or plain theoretical) standpoint, we’ll write code to explore some of the main ideas. We’ll start by implementing a few common higher-order functions ...

The best content for your career. Discover unlimited learning on demand for around $1/day.