(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A thread-able expression is an arithmetic expression which can be evaluated in order as a thread or a list. It can be defined recursively and demonstrated very intuitively by a visual representation.

## Visual representation

For example, below expression can be visualised as a binary tree

 $\displaystyle{ (1 \times 2 \times 2 - 1) \times (2 + 1) - 6 }$

It has a left branch which depth is greater than 1, so its shape dose not like a thread, and it is not a thread-able expression. While all the left branch of the other example is equals to 1, and the shape is just like a thread, we call it a thread-able expression.

 $\displaystyle{ (1 \times 2 \times 2 - 1) \times 2 - 3 }$