December 2004
Beginner
600 pages
13h 42m
English
This section summarizes properties of list object and element specifiers.
The following table provides the properties for the list class.
| Property | Meaning |
|---|---|
| length | The number of items in the list |
| reverse | The list with its items in reverse order |
| rest | Items 2 through the end of the list |
The following table summarizes the ways to specify items in a list.
| Item Specifer | Meaning |
|---|---|
| first item, second item, third item, ..., tenth item | A specific item by number |
| 1st item, 2nd item, 3rd item, ... | A specific item by number |
| item 1, item 2, item 3... | A specific item by number |
| item −1, item −2, item −3 | An item relative to the last item; where −1 references the last item |
| beginning | First item |
| last item or end | Last item |
| some item | A random item |
| middle item | The middle item; item (n +1) div 2, where n is the size of the list |
| every item | All items |
| items | Same as everyitem |
| items m through n
or items m thru n | Items m through n; can use beginning for m and end for n |
Read now
Unlock full access