Go to the first, previous, next, last section, table of contents.


delete

Function: delete { val arg -> list }
file: 10-C-lists.muf
package: muf
status: alpha

If arg is a stack, all instances of val in it are removed. Otherwise, arg must be a list.

The delete function searches list and destructively removes all references to val: The return value is a splice of the given value.

It is usually safer to construct a new list than to modify the existing one: See section remove.

Stack:
[ 'a' 'b' 'c' ]l   --> list
Stack:
'b' list delete
Stack:
list first   list second
Stack: 'a' 'c'

See section deleteNth.


Go to the first, previous, next, last section, table of contents.