exercism / v3

The work-in-progress project for developing v3 tracks
https://v3.exercism.io
Other
170 stars 163 forks source link

[Elixir] Improve the `secrets` exercise #3010

Closed angelikatyborska closed 3 years ago

angelikatyborska commented 3 years ago

As I was solving this exercise without peaking into the example solution, I had some issues figuring out the order of arguments that I'm supposed to use in the anonymous functions that I am creating.

E.g. when I read the first step "have it return a function which takes one argument and adds it to the argument passed in to secret_add", I wrote secret + x. Then I read the second step: "have it return a function which takes one argument and subtracts the argument passed in to secret_subtract.", I couldn't deduct what is supposed to be subtracted from what, so I wrote secret - x assuming it's the same order as in the first step. That was wrong.

To fix this, I rephrased the instructions to always have a preposition ("subtracts from"), to always mention the arguments in the same order they are written in the code (first x, then secret), and to always refer to the secret as the "secret", not "the argument of the other function". I hope this makes it a bit clearer.