This is actually a pattern that I've been looking for a name for, for years! And you've actually sold the OP's featured answer for me by making me use that word ("pattern"), notice the concept's genuine applicability to this context, and realize it's not a Java-spawned vulgarity.
It comes from "Pearls of Functional Algorithm Design" (R.Bird) It's basically a tree with shared nodes.