You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/higher-order-functions.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ The function that is supplied as the second parameter must have the following si
47
47
48
48
Each value in the input array is passed in as the first parameter in the supplied function. The index (position) of that value in the input array is passed in as the second parameter, if specified. The whole input array is passed in as the third parameter, if specified.
49
49
50
-
__Example__
50
+
__Example__
51
51
The following expression returns all the products whose price is higher than average:
@@ -66,7 +66,7 @@ The function that is supplied as the second parameter must have the following si
66
66
67
67
Each value in the input array is passed in as the first parameter in the supplied function. The index (position) of that value in the input array is passed in as the second parameter, if specified. The whole input array is passed in as the third parameter, if specified.
68
68
69
-
__Example__
69
+
__Example__
70
70
The following expression the product in the order whose SKU is `"0406654608"`:
@@ -79,7 +79,9 @@ __Signature:__ `$reduce(array, function [, init])`
79
79
80
80
Returns an aggregated value derived from applying the `function` parameter successively to each value in `array` in combination with the result of the previous application of the function.
81
81
82
-
The function must accept two arguments, and behaves like an infix operator between each value within the `array`.
82
+
The `function` must accept at least two arguments, and behaves like an infix operator between each value within the `array`. The signature of this supplied function must be of the form:
0 commit comments