Macros
macro del(seqIdx: untyped)
-
- del ls[idx] -> delitem(ls, idx);
- del obj.attr -> compilation-error. Nim is static-typed,
dynamically deleting object's attributes is not allowed.
- del ls[1:3] (only supported in def body)
- see list of unsupported notations
for more details.
Note: Nim's del(seq, idx) is an O(1) operation, which moves the last element to idxSource Edit