array[i] with array[i - 1] if the <function> returns 0. The first element of the given array is not replaced.
The Lambda function <function> is mandatory.
Syntax
Parameters
| Parameter | Description | Supported input types |
|---|---|---|
<function> | A Lambda function used to check elements in the array. | Any Lambda function |
<array> | The array to be evaluated by the function. | Any array |
Return Type
ARRAY of the same type as the input array
Example
The following example returns an array where all values are greater than1:
1,2,3,9