del t v
Delete the first instance of value v in table t
The remaining entries are shifted left one index to avoid holes.
Note that v is the value of the item to be deleted, not the index into the table.
(To remove an item at a particular index, use deli instead)
del returns the deleted item, or returns no value when nothing was deleted.
FOR ITEM IN ALL(A) DO
IF (ITEM < 10) THEN DEL(A, ITEM) END
FOREACH(A, PRINT) -- 10,11,12
PRINT(A) -- 12
deli t [i]
Like del(), but remove the item from table t at index i.
When i is not given, the last element of the table is removed and returned.
However, this does not seem to work with string or float indices. (Only tested on macOS Mojave)
The desired result can be achieved using