Suppose you wanted to represent an 1D space in a pure functional language, i.e., with trees. Suppose that you also needed to shift the whole space left and right. An efficient way to do it would be to use a perfect binary tree to store locations, and bit-strings to represent paths. For example:
(((0 1) (2 3)) ((4 5) (6 7)))
The tree above would represent a space with 8 locations. Then, the path:
[1,0,0]