<aside> đź’ˇ Dr. Kiczales summarises the whole idea of this chapter pretty succinctly:
...the big summary of kind of what we've seen so far is, if you have arbitrary size information, then you need arbitrary size data. That requires a well formed self referential type comment. That leads to a natural recursion in the template. That leads a recursive call in the function. You should test the base case first, and you should always trust the natural recursion.
</aside>
So far, we’ve only touched on what’s known as fixed-size data — data which represents a known and fixed amount of information in advance.
Here, we’ll explore the concept of arbitrary-sized data — data which represents information whose volume isn’t fixed.
Arbitrary-sized data can be represented through compound data, and the simplest form of arbitrary-sized data comes in the form of lists.
Lists can be constructed in 2 ways:
list
keywordcons
keywordUsing list
is simple enough - simply insert the keyword into parentheses and insert the components of the list thereafter.