Functional Programming Patterns in Scala and Clojure (PragProg)

Functional languages have their own patterns that enable you to solve problems with less code than object-oriented programming alone. This book introduces you, the experienced Java programmer, to Scala and Clojure: practical, production-quality languages that run on the JVM and interoperate with existing Java. By using both the statically typed, type-inferred Scala and the dynamically typed, modern Lisp Clojure, you’ll gain a broad understanding of functional programming.

Michael Bevilacqua-Linn

edited by John Osborn and Fahmida Y. Rashid

Functional languages have their own patterns that enable you to solve problems with less code than object-oriented programming alone. This book introduces you, the experienced Java programmer, to Scala and Clojure: practical, production-quality languages that run on the JVM and interoperate with existing Java. By using both the statically typed, type-inferred Scala and the dynamically typed, modern Lisp Clojure, you’ll gain a broad understanding of functional programming.

For each pattern, you’ll first see the traditional object-oriented solution, and then dig into the functional replacements in both Scala and Clojure. These patterns are common in the functional world and deserve to become part of your problem-solving toolkit. On the object-oriented side, you’ll see many common patterns, such as Command, Strategy, and Null Object. On the functional side, you’ll learn core functional patterns such as Memoization, Lazy Sequence, and Tail Recursion.

Each pattern helps you solve a common programming problem. Working through them gives you a set of patterns you can use to solve problems you come across while writing programs. Finally, you’ll learn how to work your existing Java code into new Scala or Clojure projects. You can start off small, adding functional code little by little, so you can complement your existing knowledge with Scala and Clojure as these languages gain popularity on the JVM.


“This book is an absolute gem and should be required reading for anybody looking to transition from OO to FP. It is an extremely well-built safety rope for those crossing the bridge between two very different worlds. Consider this mandatory reading.”

– Colin Yates, technical team leader, QFI Consulting, LLP


  • Full details: Search
  • View this book’s portal and details on how to post errata and suggestions here.

Don’t forget you can get 35% off with your Devtalk discount! Just use the coupon code “devtalk.com" at checkout :+1:

2 Likes

Hi guys,
where has the errata gone for this book?

2 Likes

Hi there and good question!

We’re using the migration to our new website to do a lot of things better. The new site is faster, more mobile friendly and way more searchable. But beyond the tech itself, we’re also using this migration as an opportunity to completely rethink and improve on some non-technical things, like how we handle errata.

We’re now using the forums here on Devtalk as a way to have conversations around our books, including discussing things that can be improved. Some of the old-style “errata” reports will be brought over and integrated into new conversations in the coming weeks. Those conversations for this book haven’t started yet.

If you’d like, please feel free get the ball rolling with a brand new thread of your own right here. Or, if you’d rather wait to see how things unfold, set the thread status to “Watching” for notifications whenever something new is posted.

Thanks for the question and thanks for reaching out!

2 Likes