The array to scan.
The evaluation predicate, which should return true if the element satisfies the condition and false if not. This predicate may be any callable type.
an optional buffer into which elements are filtered. This is the array that gets returned to you.
A new array with just the elements from buf that satisfy pred.
Notes: While most Array functions that take an output buffer size that buffer optimally, in this case, there is no way of knowing whether the output will be empty or the entire input array. If you have special knowledge in this regard, preallocating the output buffer will be advantageous.
Performs a linear scan of buf from [0 .. buf.length$(RP), creating a new array with just the elements that satisfy pred. The relative order of elements will be preserved.