[ library(tentative) | Reference Manual | Alphabetic Index ]

vs_element(+VS, +I, -X)

Get an element of a varset by index
VS
A varset
I
A positive integer
X
A variable (output)

Description

Get the Ith element of a varset. I must be between 1 and the size of the set.

Modes and Determinism

Examples

    ?- Vars=[A,B,C], tent_set_all(Vars, 99), vs_create(Vars, VS), vs_element(VS, 3, X).
    VS = ...
    X = C
    Yes (0.00s cpu)
    

See Also

vs_create / 2, vs_size / 2