array_map()
function array_map(?callable $callback, array $array, ...$arrays): array
Applies a callback to the elements of an array.
Parameters:
$callback(?callable)$array(array)...$arrays- variadic: collects excess arguments into$arrays.
Returns: array
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported through a declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/array/array_map.rs).
No examples yet. Check examples/ and showcases/ for usage patterns.
Internals
For how array_map is implemented in the compiler, see the internals page.