the array.
the function to apply.
a buffer in which to store the results. This will be resized if it does not have sufficient space.
an array (the same as the buffer passed in, if possible) where the ith element is the result of applying func to the ith element of the input array
Buffer!(long) buffer; auto mapping = map( [1, 17, 8, 12][], (int i) { return i * 2L; }, buffer ); test!("==")(mapping[], [2L, 34L, 16L, 24L]);
Apply a function to each element an array. The function's return values are stored in another array.