Filter each element of an array via a function.
Data passed to the function on each iteration,
_array | Array ARRAY |
_filter | Function to filter each element <CODE> |
_inPlace | true: alter array, false: copy array (optional, default: false) <BOOLEAN> |
Filtered array ARRAY
// Filter to create a new array. _original = [1, 2, 3]; _filtered = [_original, {_x + 1}] call CBA_fnc_filter; // _original ==> [1, 2, 3] // _filtered ==> [2, 3, 4] // Filter original array in place. _original = [1, 2, 3]; [_original, {_x * 10}, true] call CBA_fnc_filter; // _original ==> [10, 20, 30]
Spooner, commy2