Appends a term to a term vector.
tv_add/2 expands the size of the vector Vector by one element and sets the last element of the expanded vector to Term.
Vector object (term vector) Index integer Term term
tv_create(V),
tv_size(V, InitialSize),
tv_add(V, one),
tv_add(V, two),
tv_size(V, FinalSize),
tv_list(V, L).
->
InitialSize = 0
FinalSize = 2
L = [one,two]
This predicate is not part of the ISO-Prolog Standard.
| scroll to top |
|