importance: 4

---

# Sum with closures

Write function `sum` that works like this: `sum(a)(b) = a+b`.

Yes, exactly this way, using double parentheses (not a mistype).

For instance:

```js
sum(1)(2) = 3
sum(5)(-1) = 4
```

