next up previous contents
Next: Coercion of scalars to Up: Vectors and vector operators Previous: Comparison operators on vectors   Contents

Vector sets

The ``union'' operator can be applied to vectors, to produce a set of vectors. In particular, one can express a nondeterministic choice between the vectors [0,1] and [1,0] by writing

        [0,1] union [1,0]
Note that the following is not legal, however:

        {[0,1], [1,0]}
As with other operators, vectors are padded with zeros to the same length before the union operator is applied. The ``in'' operator may also be applied to vector sets. In general:
        [a,b] in ([c,d] union [e,f])
is equivalent to
        ([a,b] = [c,d]) | ([a,b] = [e,f])



2002-10-28