Sfairadora

  • Reference Guide

pull

pull(seq, var_elem)
var_seq <- pull(var_elem)
Removes the first element of the sequence and stores it to the variable var_elem. The first variant removes the element form the sequence seq; the parameter itself is, however, left unchanged. The modified sequence is returned as the function result. The latter variant changes the value of the variable or data item var_seq. The removed item is stored to the variable (or data item) denoted by the l-value var_elem. The type of the variable/data item must be the same as the element of the sequence.

Return Value

The first variant returns the modified sequence, which is of the same type as the parameter seq.
The latter variant returns l-value referring to the variable var_seq.
If the sequence is empty, an error is returned.

See Also