Skip to content

Commit 326adea

Browse files
committed
Improved readability of second paragraph
Resolved grammatical issues and more thoroughly introduced the map function.
1 parent 5fa3d51 commit 326adea

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

functions/higher_order.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ Higher order functions are functions that manipulate other functions.
44
For example, a function can take other functions as arguments and/or produce a function as its return value.
55
Such *fancy* functional techniques are powerful constructs available to you in JavaScript and other high-level languages like python, lisp, etc.
66

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).
108

119
```javascript
1210
// Define two simple functions

0 commit comments

Comments
 (0)