radix-tree: generalized code for every kind of node, not just the root