← All docs
array_chunk() — internals
Compiler internals for array_chunk(): lowering path, type checks, and runtime helpers.
array_chunk() — internals
Where it lives
- Signature:
src/builtins/array/array_chunk.rs - Lowering:
src/codegen/lower_inst/builtins/arrays.rs:80 (lower_array_chunk) - Function symbol:
lower_array_chunk()
Lowering notes
- Lowers
array_chunk()by splitting an indexed array into nested indexed arrays.
Runtime helpers
No direct __rt_* helpers captured — the lowering is inlined or routes through another builtin.
Signature summary
function array_chunk(array $array, int $length): array
What the type checker enforces
- Arity: takes exactly 2 arguments.
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/array/array_chunk.rs(eval_builtin!) - Dispatch hooks:
direct,values