Next: , Up: The List Library   [Index]


13.3.1 Non Data Type Specific List Functions

l_cast

list l_cast(list l, list t);

is l, empties the l list and links or copies the content of the t list in l (data references are made where the types allow, copies where not)

l_clear

list l_clear(list l);

is l, empties the l list

l_copy

list l_copy(list l, list t);

is l, empties the l list and copies the content of the t list in l

l_delete

list l_delete(list l, integer m);

is l, deletes the m indexed element of the l list

l_down

void l_down(list l, integer m);

decrements the m indexed element in the l list (the element type is intrinsic numerical)

l_edit

list l_edit(list l, integer p, integer e);

is l, deletes e elements in the l list immediately after the p position if e is positive, -e elements immediately before p if e is negative

l_id

integer l_id(list l, integer m);

is the type ID of the m indexed element in the l list

l_length

integer l_length(list l);

is the length (i.e. number of items) of the l list

l_move

list l_move(list l, integer m, integer n);

is l, moves the m indexed element of the l list in the n position

l_new

void l_new(list &l);

sets the l list as a new list (same as ‘l_clear’ if l is not linked multiple times, otherwise creates a new list and sets l as a reference to the new list)

The function is generated on request only.

l_offset

list l_offset(list l, integer m);

is l, shifts (rotates/circulates) the l list (as if it was a circular list) until the (m % <list size> + <list size>) % <list size> element becomes the first

l_post

void l_post(list l, integer m, list t, integer n);

moves the m indexed element of the l list in the n position in the t list

l_rand

list l_rand(list l);

is l, shuffles the content of the l list

l_reverse

list l_reverse(list l);

is l, reverses the order of the elements in the l list

l_set

list l_set(list &l, list t);

is t, sets the l list as a reference of the t list

The function is generated on request only.

l_spin

list l_spin(list l, integer m, integer n);

is l, exchanges the m and n indexed elements in the l list

l_swap

list l_swap(list l, list t);

is l, exchanges the content of the l and t lists.

The function visits every item in the two collections.

l_trade

void l_trade(list l, integer m, list t, integer n);

exchanges the m indexed element in the l list and the n indexed element in the t list

l_type

text l_type(list l, integer m);

is the type name of the m indexed element in the l list

l_up

void l_up(list l, integer m);

increments the m indexed element in the l list (the element type is intrinsic numerical)

l_xcall

object l_xcall(list l, object o, &...);

is the evaluation result of the function indicated by o called with all the variadic arguments of l_xcall and all the elements of the l list, in this order

The variadic arguments are passed by reference where possible.


Next: List Traversal Functions, Up: The List Library   [Index]