I think Lua is an interesting language and I really like it having TCO, so that I can properly write recursive logic like in a Scheme. However, I am somewhat worried about data structures. When I read about Lua, it always seems quite thin on that front. On the other hand I just looked up Lua data structures and found a book called "Programming in Lua" and the first page I read was about "tables", which I assume to be something like dictionaries in Python, and it says that arrays and others are implemented on top of "tables". What about immutable data structures? Are there libraries for purely functional data structures? How complete are they?

These things I don't usually look up for Python, because Python is clearly not a very functional language and doesn't have the immutable data structures at all, and doesn't even feature TCO, so basically Python is mostly lost, when it comes to doing FP, and I accept, that it is not really that kind of language. I only try to use FP knowledge to avoid common pitfalls, when coding in Python. But from Lua I would expect better.