remd
remd(
g_x
l_arg
)
=> l_result
Description
Removes all top-level elements equal to a SKILL object from a list. This is a destructive removal, which means that the original list itself is modified. Therefore, any other reference to that list will also see the changes.
remd uses equal for comparison.
Arguments
Value Returned
|
Returns l_arg modified so that all top-level elements equal to g_x are removed. |
Examples
y = '("a" "b" "x" "d" "f")
=> ("a" "b" "x" "d" "f")
remd( "x" y)
=> ("a" "b" "d" "f")
y
=> ("a" "b" "d" "f")
The first element from the original list will not be modified in-place.
y = '("a" "b" "d" "f")
=> ("a" "b" "d" "f")
remd( "a" y)
=> ("b" "d" "f")
y
=> ("a" "b" "d" "f")
Note the original list, y, is not modified.
In order to remove the first element from the original list, use the same variable (that holds the original list) to hold the updated list.
y = '("a" "b" "d" "f")
=> ("a" "b" "d" "f")
y=remd("a" y)
=> ("b" "d" "f")
y
=> ("b" "d" "f")
Related Topics
Return to top