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, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access