4.3 Slicing and dicing a list
There are many times when we’ll want to pick items from a list. One of the most common kinds of processing is to treat the first item of a list as a special case. This leads to a kind of head-tail processing where we treat the head of a list differently from the items in the tail of a list.
We can use these techniques to make a copy of a list too.
4.3.1 Getting ready
We have a spreadsheet that was used to record fuel consumption on a large sailboat. It has rows that look like this:
|
|
|
|
date | ... |