This commit is contained in:
Ilya Kantor 2017-03-21 14:41:49 +03:00
parent 4ae129054e
commit ab9ab64bd5
476 changed files with 3370 additions and 532 deletions

View file

@ -0,0 +1,17 @@
importance: 4
---
# Sum with closures
Write function `sum` that works like this: `sum(a)(b) = a+b`.
Yes, exactly this way, via double brackets (not a mistype).
For instance:
```js
sum(1)(2) = 3
sum(5)(-1) = 4
```