Consider a binary tree used for fast searching, where every node has the recursive invariant that subnodes on the left are less than the node, and subnodes on the right are greater than the node. For instance, the set of data:
might be represented by the following binary search tree:
The next diagram is persistent tree. Notice two points: Firstly the original tree () persists. Secondly many common nodes are shared between the old tree and the new tree. Such persistence and sharing is difficult to manage without some form of garbage collection to automatically free up nodes which have no live references, and this is why is a feature commonly found in functional programming languages.