5.1.6 Transforming a list into a boolean expression
The list2exp
command is the inverse of exp2list; it takes lists and
tranforms them into boolean expressions. It can do this in two ways.
list2exp can take two arguments:
L, a list of values of
the form [a1,…,an].
x, a variable name.
list2exp(L,x) returns
the boolean expression (x=a1) or … or (x=an).
Alternatively,
list2exp can take two arguments:
L, a list where each element of L it itself a list
of n values of the form [a1,…,an].
vars, a list [x1,…,xn] of n variable names.
list2exp(L,vars) returns a
boolean expression of the form
(x1=a1) and … and (xn=an) for each
list of n values in the first argument, combined with ors.