November 2010
Intermediate to advanced
504 pages
12h 45m
English
The format function with its many control sequences is practically a programming language in its own right. (In fact, many Lispers would call it a domain-specific language, a concept we will revisit in Chapter 17.) And, like most programming languages, format can loop through data. It does this using the ˜{ and ˜} control sequences.
To achieve this looping, pass the format function a control string containing ˜{ and ˜}, and a list to iterate through. The part of the control string between the ˜{ and ˜} sequences is treated almost like the body of a loop. It will be executed a number of times, depending on the length of the list that follows it. The format function will iterate through this list, applying ...
Read now
Unlock full access