Skip to content

Commit

Permalink
add numbers to hints
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbicodes committed Oct 13, 2023
1 parent e2494a4 commit 5b3b65a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions exercises/concept/card-games/.docs/hints.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
# Hints

## Tracking Poker Rounds
## 1. Tracking Poker Rounds

- The [`list`][list] function returns a list consisting of the arguments it is passed.

## Keeping all Rounds in the Same Place
## 2. Keeping all Rounds in the Same Place

- The [`concat`][concat] function can be used to concatenate two lists together.

## Finding Prior Rounds
## 3. Finding Prior Rounds

- The [`some`][some] function will return the first logically true value in a collection.
- [`boolean`][boolean] is useful in cases where a function returns a value but the tests are expecting a boolean.

## Averaging Card Values
## 4. Averaging Card Values

- Recall basic arithmetic operators such as [`/`][division] and [`+`][addition].
- A collection of numbers can be summed using either [`apply`][apply] or [`reduce`][reduce].
- The [`count`][count] function returns the number of items in a collection.
- The `/` function returns a ratio type when operating on integers. You can use [`double`][double] to convert a ratio to a decimal.

## Alternate Averages
## 5. Alternate Averages

- There are sequence functions to return the [`first`][first] or [`last`] element of a sequential collection.
- 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].
- Use [`or`][or] to determine if either condition is true.

## More Averaging Techniques
## 6. More Averaging Techniques

- 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.

## Bonus Round Rules
## 7. Bonus Round Rules

- Recall how to use [`if`][if] from the exercise on conditionals.
- You can return all items of a collection except for the last one using [`butlast`][butlast].
Expand Down

0 comments on commit 5b3b65a

Please sign in to comment.