remove
remove(g_xl_arg) => l_resultremove( g_key o_table )=> g_value
Description
Returns a copy of a list with all top-level elements equal to a SKILL object removed. Can also be used to remove an entry from an association table, in which case the removal is destructive, that is, any other reference to the table will also see the changes. remove uses equal for comparison. remove can also be used with an association table to identify and remove an entry corresponding to the key specified in the function.
Arguments
|
Association table containing the key/value pairs to be processed. |
Value Returned
|
Copy of l_arg with all top-level elements equal to g_x removed. |
|
Examples
remove( "x" '("a" "b" "x" "d" "f"))
=> ("a" "b" "d" "f")
myTable = makeTable("myTable" -1)
=> table:myTable ;default is -1
myTable["two"]=2
=> 2
remove("two" myTable)
=> 2 ; permanently removed from table
myTable["two"]
=> -1 ; the default value
Related Topics
Return to top