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 ...

Get Clojure in Action 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.