Insert¶
Status: Stable
documented, exercised by the test suite and/or worked examples, with no known limitations recorded.
Description¶
Examples¶
All examples below are verified against the current Mathilda build.
Implementation notes¶
builtin_insert (in src/part.c) handles the 3-arg form Insert[expr, elem, pos] by delegating to the helper expr_insert, which inserts elem before position pos (negative indices count from the end, and a position may be a list path for nested insertion), deep-copying the surrounding structure and preserving the original head.
poscan be a single index, a list (path), or a list of paths.Delete[expr, 0]replaces the head withSequence.
Attributes: none registered.
Implementation status¶
Stable — documented, exercised by the test suite and/or worked examples, with no known limitations recorded.
References¶
- Source:
src/part.c - Specification:
docs/spec/builtins/structural-manipulation.md