Next: List Constructor Functions, Previous: Data Type Generic List Back Functions, Up: The List Library [Index]
The variadic arguments are passed by reference where possible. A shallow copy (with data linked for referable objects) is made before and used for traversal (so that data seen by the called function is what existed when the traversal began).
list l_rform(list l, object o, integer i, &...);
is l, replaces each element in the l list with the evaluation result of the function indicated by o called with the unnamed arguments and the list element inserted at the position i in between the unnamed arguments (references are made where data types allow).
l content is taken out of l for the duration of ‘l_rform’ evaluation. Whatever content l may have gained in the mean time is destroyed when the replacement is put back.
If ‘l_rform’ fails, the l intermediary state may become visible for the duration of the bounding statement evaluation.
The (already o obtained) replacement data is kept for subsequent failures.
void l_ucall(list l, object o, integer i, &...);
calls the function indicated by o for each element in the l list, with the unnamed arguments and the list element inserted at the position i in between the unnamed arguments
void lq_ucall(list l, object o, integer i, integer p, integer q, &...);
calls the function indicated by o for each of the p to q indexed elements in the l list, with the unnamed arguments and the list element inserted at the position i in between the unnamed arguments
If q indicates an element prior to p the elements starting with the p indexed one to the end of the list and those from the beginning of the list to the q indexed one are used (as if the list was circular).
void lr_ucall(list l, object o, integer i, integer p, integer r, &...);
calls the function indicated by o for each of the l list elements between the p and r positions, with the unnamed arguments and the list element inserted at the position i in between the unnamed arguments
If r indicates an position prior to p the elements between p and the end of the list and those from the beginning of the list to r are used (as if the list was circular).
Next: List Constructor Functions, Previous: Data Type Generic List Back Functions, Up: The List Library [Index]