GeezerVison is showing github.com — Improved readability of second paragraph · atik2002/javascript@326adea
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: functions/higher_order.md +1-3Lines changed: 1 addition & 3 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -4,9 +4,7 @@ Higher order functions are functions that manipulate other functions. |
4 | 4 | For example, a function can take other functions as arguments and/or produce a function as its return value. |
5 | 5 | Such *fancy* functional techniques are powerful constructs available to you in JavaScript and other high-level languages like python, lisp, etc. |
6 | 6 |
|
7 | | -We will now create two simple functions `add_2` and `double` and higher order |
8 | | -function called `map(func, list)` which applies the function `func` (the first argument) |
9 | | -to each of the elements in the array `list` (the second argument). |
| 7 | +We will now create two simple functions, `add_2` and `double`, and a higher order function called `map`. `map` will accept two arguments, `func` and `list` (its declaration will therefore begin `map(func,list)`), and return an array. `func` (the first argument) will be a function that will be applied to each of the elements in the array `list` (the second argument). |
10 | 8 |
|
11 | 9 | ```javascript |
12 | 10 | // Define two simple functions |
|