O'Reilly logo

Common Lisp Recipes: A Problem-Solution Approach by Edmund Weitz

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

7. Sequences and Iteration

Lists (see Chapter 2) and vectors (see Chapter 5) have in common that you can traverse them sequentially. That’s why they are subsumed under the type SEQUENCE in COMMON LISP. There are a lot of functions in the standard that work on sequences, which is to say that they accept lists as well as vectors as arguments. (And also strings, see Chapter 3, because those are vectors, too.) We’ll discuss most of them in this chapter. (And see also Recipe 3-7.)

Sequences are also intimately related to iteration, which is the other major topic of this chapter. We are not going to discuss the basics of iteration because we’re assuming that you already have some experience with DO, DOTIMES, LOOP, and friends.1 But maybe we can present ...

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