rem_from_list/2—remove the first occurrence of an element from a list slot

The rem_from_list/2  operation removes the first occurrence of an element from a list slot. The syntax for this function is as follows:

rem_from_list($ELEM,$LISTSLOT)

rem_from_list/2 arguments

Argument

Mode

Type

Description

$ELEM

Input

ANY

Specifies the element to be removed from the list

$LISTSLOT

Input

SLOTREF

Specifies the list slot from which the first occurrence of $ELEM is to be removed

Use rem_from_list/2 operation to remove the first occurrence of the value in $ELEM from the list slot specified in the $LISTSLOT argument.

This primitive fails if the indicated slot is not a list slot, or if the type of the element does not correspond to the type of the elements of the list.

rem_from_list/2 example

rem_from_list(my_slot,$E.mc_bad_slot_names);
Was this page helpful? Yes No Submitting... Thank you

Comments