O'Reilly logo

Seven Languages in Seven Weeks by Bruce A. Tate

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Day 2: Yoda and the Force

As a Jedi master, Yoda trained apprentices to use and understand the Force, the unifying presence between all living things. In this section, we get to the concepts fundamental to Clojure. We’ll talk about sequences, the abstraction layer that unifies all Clojure collections and ties them to Java collections. We’ll also look at lazy evaluation, the just-in-time strategy that computes sequence members only when you need them. And then we’ll look at that mystical language feature that is the Force for all Lisps, the macro.

Recursion with loop and recur

As you’ve learned in other languages in this book, functional languages depend on recursion rather than iteration. Here’s a recursive program to evaluate the size of a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required