Skip to content

Commit

Permalink
Changed secret.add example values to avoid further confusion (#1524)
Browse files Browse the repository at this point in the history
* changed secret.add values to avoid further confusion

* Apply suggestions from code review

---------

Co-authored-by: Angelika Cathor <angelikatyborska@fastmail.com>
  • Loading branch information
Newters and angelikatyborska authored Sep 25, 2024
1 parent 0dbdbc2 commit ba66fc5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions exercises/concept/secrets/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ All functions should expect integer arguments. Integers are also suitable for pe
Implement `Secrets.secret_add/1`. It should return a function which takes one argument and adds to it the argument passed in to `secret_add`.

```elixir
adder = Secrets.secret_add(2)
adder = Secrets.secret_add(3)
adder.(2)
# => 4
# => 5
```

## 2. Create a subtractor
Expand Down
6 changes: 3 additions & 3 deletions exercises/concept/secrets/test/secrets_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ defmodule SecretsTest do

describe "secret_add" do
@tag task_id: 1
test "add 3" do
add = Secrets.secret_add(3)
assert add.(3) === 6
test "add 4" do
add = Secrets.secret_add(4)
assert add.(3) === 7
end

@tag task_id: 1
Expand Down

0 comments on commit ba66fc5

Please sign in to comment.