Files
exercism-workspace/secrets/HINTS.md
Alexander Heldt f83515caf0 secrets
2025-11-01 13:39:36 +01:00

897 B

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.