Skip to content

Commit

Permalink
add task numbers (#564)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbicodes committed Jun 30, 2023
1 parent 9d57730 commit f36d859
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions exercises/concept/bird-watcher/.docs/hints.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
# Hints

## Check what the counts were last week
## 1. Check what the counts were last week

- [Vectors][vectors] are represented in Clojure using square brackets (`[ ]`)

## Check how many birds visited today
## 2. Check how many birds visited today

- The [`last`][last] function can be used to return the last item in a sequential collection.

## Increment today's count
## 3. Increment today's count

- The [`update`][update] function can be used to return a new vector with a different element at a given index.

- The [`count`][count] function can be used to find the length of the vector.

- The [`inc`][inc] and [`dec`][dec] functions can be used to increment and decrement integer values.

## Check if there was a day with no visiting birds
## 4. Check if there was a day with no visiting birds

- The [`every?`][every?] function can be used to check if all items in a collection satisfy a given predicate.

- The [`pos?`][pos?] predicate returns true if a number is greater than zero.

- The [`not`][not] function returns true if an expression evaluates to logical false.

## Calculate the number of visiting birds for the first number of days
## 5. Calculate the number of visiting birds for the first number of days

- The [`take`][take] function can be used return a sequence of the first n items in a collection.

- The [`reduce`][reduce] function can be used to add a collection of values together.

## Calculate the number of busy days
## 6. Calculate the number of busy days

- The [`filter`][filter] higher-order function can be used to return a sequence of items in a collection which satisfy a given predicate.

## Check for odd week
## 7. Check for odd week

- The [`=`][equality] function can be used to test equality.

Expand Down

0 comments on commit f36d859

Please sign in to comment.