I'll use this challenge as an example. It says "Input will be a list of [...]" and I would like to code that challenge in Lua.
The problem here is, Lua doesn't accept lists as input, only strings (and maybe numbers since it has implicit coercion). There are two solutions:
- I can write the list as a string and deserialize it no problem, but should I count this process in my byte count? Or there would be no problem in deserializing and passing it to the function/rest of the program as a list (we call lists 'tables' in Lua)?
- I can pass each element on the list as different arguments, because then Lua would let me create a list (table) from these arguments.
I hope my question is clear. If there's already an answer for that I'm sorry, but I couldn't find.