### 5.1.5 Transforming a boolean expression to a list

The exp2list command can transform certain booleans into a list.

- exp2list takes one argument: eqseq, a sequence of equalities (or inequalities) connected with ors, such as (x=a1) or … or (x=an).
- exp2list(eqseq) returns the list [a1,…,an] of right-hand sides of the (in)equalities.

The exp2list command is useful in TI mode for easier processing of the answer to a solve command.

#### Examples

exp2list((x=2) or (x=0))

| ⎡ ⎣ | 2,0 | ⎤ ⎦

exp2list((x>0) or (x<2))

| ⎡ ⎣ | 0,2 | ⎤ ⎦

In TI mode:

exp2list(solve((x-1)*(x-2)))

| ⎡ ⎣ | 1,2 | ⎤ ⎦