Skip to content

Commit 4289548

Browse files
committed
Adding small details in README text
1 parent 71e1f65 commit 4289548

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ A Cookbook for writing FP in JavaScript using ES6
1111
* [Currying](#currying)
1212

1313
### Pure functions
14-
Returns the same result given same parameters. It's execution doesn't depend on the state of the system
14+
Returns the same result given same parameters. It's execution doesn't depend on the state of the system.
1515

1616
1) Impure
1717

1818
```javascript
1919
let number = 1;
2020
let increment = () => {
2121
return number += 1;
22-
};
22+
}
2323
increment();
2424
// 2
2525
```
@@ -29,13 +29,13 @@ increment();
2929
```javascript
3030
let increment = (n) => {
3131
return n + 1;
32-
};
32+
}
3333
increment(1);
3434
// 2
3535
```
3636

3737
### Higher-order functions
38-
Functions that operate on other functions, either by taking them as arguments or by returning them
38+
Functions that operate on other functions, either by taking them as arguments or by returning them.
3939

4040
1) Sum
4141

@@ -113,7 +113,7 @@ totalGrades
113113
```
114114

115115
### Recursion
116-
Whenever a function calls itself, creating a loop
116+
Whenever a function calls itself, creating a loop.
117117

118118
1) Countdown
119119

@@ -166,7 +166,7 @@ numbers.map(plus1);
166166
```
167167

168168
### Destructuring
169-
Extract data from arrays or objects using a syntax that mirrors the construction of array and object literals. Or "Pattern Matching"
169+
Extract data from arrays or objects using a syntax that mirrors the construction of array and object literals. Or "Pattern Matching".
170170

171171
1) Select from pattern
172172

@@ -203,7 +203,7 @@ ajax({ }, "additional", "data", "hello");
203203
```
204204

205205
### Currying
206-
Taking a function that takes multiple arguments and turning it into a chain of functions each taking one argument and returning the next function, until the last returns the result
206+
Taking a function that takes multiple arguments and turning it into a chain of functions each taking one argument and returning the next function, until the last returns the result.
207207

208208
1) Currying an Object
209209

0 commit comments

Comments
 (0)