Several times, when working with Lua, I’ve made what I call “Janus tables”.
Give them a string, they return a table or function. Give them the table or function, they return a string.
It’s a useful technique that you can only apply if your hashmap can map anything to anything.