24 lines
382 B
Markdown
24 lines
382 B
Markdown
# Adding numbers
|
|
|
|
Functions take values and return values.
|
|
|
|
## Exercises
|
|
|
|
### Exercise 2.1 — `add`
|
|
|
|
Implement `add(a, b)` so that it returns the sum of its arguments.
|
|
|
|
## Hints
|
|
|
|
<details><summary>Exercise 2.1 (add) — nudge</summary>
|
|
|
|
Which operator combines two numbers?
|
|
|
|
</details>
|
|
|
|
<details><summary>Exercise 2.1 (add) — near-solution</summary>
|
|
|
|
Return `a + b`.
|
|
|
|
</details>
|