Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions katas/more-than-one-call/more-than-one-call.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
function sum(a,b) {

}
8 changes: 8 additions & 0 deletions katas/more-than-one-call/more-than-one-call_test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
describe('sum function', function() {

it('should return the sum of the numbers.', function() {
Test.expect(sum(2,3), 5);
Test.expect(sum(2)(3), 5);
Test.expect(sum(3)(3)(1), 7);
});
});
20 changes: 20 additions & 0 deletions katas/more-than-one-call/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
####Description:

Write a single function that can be invoked by either

####Example:

```js

sum(2,3); //5
//or
sum(2)(3); //5

Both of these examples should return the sum of the numbers.
```

See [tests in more-than-one-call_test.js](https://github.com/AlexVvx/code-wars/blob/master/katas/more-than-one-call/more-than-one-call_test.js)

#####[Original Kata](https://www.codewars.com/kata/547aadd5b84a1fd66800041e)

Good luck