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

Programming Constructs

One of the most exciting parts of writing this book was the exposure to the basic building blocks in the various languages of this book. For each new language, I introduced major new concepts. These are some of the programming constructs that you’re likely to see in other new languages you might discover. They are among my favorite discoveries.

List Comprehensions

As you saw in Erlang, Clojure, and Haskell,[30] the list comprehension is a compact structure that combines several ideas into a single powerful construct. A list comprehension has a filter, a map, and a Cartesian product.

We first encountered list comprehensions in Erlang. We started with a shopping cart of items such as Cart = [{pencil, 4, 0.25}, {pen, 1, ...

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