generalization of Key type for generic trie operations