Delete¶
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_delete (in src/part.c) drives the recursive helper delete_path, which walks an integer position (or position path) into the expression tree and removes the targeted element by rebuilding the enclosing function with all arguments except that index. Negative indices count from the end, position 0 targets the head (replaced by a Sequence[...] of the remaining parts), and out-of-range indices leave the structure unchanged.
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