add_to_list/2—add an element at the beginning of a list  slot


The add_to_list/2 operation adds an element at the beginning of a list  slot. The syntax for this function is as follows:

add_to_list($ELEM,$LISTSLOT)

add_to_list/2 arguments

Argument

Mode

Type

Description

$ELEM

Input

ANY

Specifies the element to add to the list

$LISTSLOT

Input

SLOTREF

Specifies the list slot to which the element is to be added

Use the add_to_list/2 operation to add the value of $ELEM as the first element of the list slot $LISTSLOT.

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.

add_to_list/2 example

add_to_list(my_slot,$E.mc_bad_slot_names);

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*