|
1 | 1 | # Hints |
2 | 2 |
|
3 | | -## Tracking Poker Rounds |
| 3 | +## 1. Tracking Poker Rounds |
4 | 4 |
|
5 | 5 | - The [`list`][list] function returns a list consisting of the arguments it is passed. |
6 | 6 |
|
7 | | -## Keeping all Rounds in the Same Place |
| 7 | +## 2. Keeping all Rounds in the Same Place |
8 | 8 |
|
9 | 9 | - The [`concat`][concat] function can be used to concatenate two lists together. |
10 | 10 |
|
11 | | -## Finding Prior Rounds |
| 11 | +## 3. Finding Prior Rounds |
12 | 12 |
|
13 | 13 | - The [`some`][some] function will return the first logically true value in a collection. |
14 | 14 | - [`boolean`][boolean] is useful in cases where a function returns a value but the tests are expecting a boolean. |
15 | 15 |
|
16 | | -## Averaging Card Values |
| 16 | +## 4. Averaging Card Values |
17 | 17 |
|
18 | 18 | - Recall basic arithmetic operators such as [`/`][division] and [`+`][addition]. |
19 | 19 | - A collection of numbers can be summed using either [`apply`][apply] or [`reduce`][reduce]. |
20 | 20 | - The [`count`][count] function returns the number of items in a collection. |
21 | 21 | - The `/` function returns a ratio type when operating on integers. You can use [`double`][double] to convert a ratio to a decimal. |
22 | 22 |
|
23 | | -## Alternate Averages |
| 23 | +## 5. Alternate Averages |
24 | 24 |
|
25 | 25 | - There are sequence functions to return the [`first`][first] or [`last`] element of a sequential collection. |
26 | 26 | - To find the middle card you can divide the number of cards by 2, round to the lowest integer with [`int`][int], and retrieve the card at that index using [`nth`][nth]. |
27 | 27 | - Use [`or`][or] to determine if either condition is true. |
28 | 28 |
|
29 | | -## More Averaging Techniques |
| 29 | +## 6. More Averaging Techniques |
30 | 30 |
|
31 | 31 | - One way of retrieving the cards at even/odd indices would be to [`map`][map] a function using [`nth`][nth] over a [`range`][range], which takes an optional `step` argument. |
32 | 32 |
|
33 | | -## Bonus Round Rules |
| 33 | +## 7. Bonus Round Rules |
34 | 34 |
|
35 | 35 | - Recall how to use [`if`][if] from the exercise on conditionals. |
36 | 36 | - You can return all items of a collection except for the last one using [`butlast`][butlast]. |
|
0 commit comments