26 lines
897 B
Markdown
26 lines
897 B
Markdown
# Hints
|
|
|
|
## General
|
|
|
|
- Make use of anonymous functions.
|
|
- Anonymous functions can reference variables in scope when they were defined.
|
|
|
|
## 1. Create an adder
|
|
|
|
- Return an anonymous function which adds the argument from the anonymous function to the argument passed in to `secret_add`.
|
|
|
|
## 2. Create a subtractor
|
|
|
|
- Return an anonymous function which subtracts the argument passed in to `secret_subtract` from the argument from the anonymous function.
|
|
|
|
## 3. Create a multiplier
|
|
|
|
- Return an anonymous function which multiplies the argument from the anonymous function to the argument passed in to `secret_multiply`.
|
|
|
|
## 4. Create a divider
|
|
|
|
- Return an anonymous function which divides the argument from the anonymous function by the argument passed in to `secret_divide`.
|
|
|
|
## 5. Create a function combiner
|
|
|
|
- Return an anonymous function which each of the functions passed in to `secret_combine`. |